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 .
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.
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: https://help.talend.com/reader/e50RrW~XqnfMOrZ2XGd2WA/DUOAjEyo59OWl6HZgyKbtA
please answer this problem.
We have already replied to your another topic:https://community.talend.com/t5/Design-and-Development/Talend-with-github/m-p/43597#M13069.
Could you please have a look at it?