Six Stars

Need urgent help to trigger a Talend job



   Need urgent help. I need to trigger talend jobs by checking validation flag from  a table .

  for eg. If suppose Job A has Validation flag V means I can run that job.If Validation is V1 or null , I don,t need to run that job .

  I have multiple criteria for this validation, means kind of IF ELSE to execute a particular job. 

  I want to understand that how i can do this in talend . Do i need to write java code in tjavarow or talend has in built methods to do it.

Please help .

Seven Stars

Re: Need urgent help to trigger a Talend job

Assuming your table contains the job name and validation flag, you can do this,

1. Fetch validation flag value from table and store in a context variable.

2. Use tjava component and connect it to the start of your job.

3. Use if condition from tjava component and give your condition.


Twelve Stars

Re: Need urgent help to trigger a Talend job

You can do this using the tRunJob and "Use Dynamic Job" functionality. Essentially you link all of the jobs you potentially want to run to the tRunJob with this functionality switched on. You then drive the process by a query to your db table that holds the status. This query you will need to return the name of the job to be run (an easy modification to whatever you have now OR an addition of logic within the job). You pass this value to the "Context job"  parameter in the tRunJob, and that will cause the tRunJob to call the dynamically selected job. 


Give it a go with a simple example first to get an idea for how it works. After that it is easy and VERY powerful. Here is the Talend documentation:

Rilhia Solutions
Six Stars

Re: Need urgent help to trigger a Talend job


Re: Need urgent help to trigger a Talend job


We have already replied to your another topic:

Could you please have a look at it?

Best regards



Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.