I’m new to talend and I am currently exploring the possibilities of the open source Talend Data Integration tool.
I have a question about scheduling jobs. This video describes how to schedule jobs using windows task scheduler https://www.youtube.com/watch?v=5Rd8gtqOcXU
But what if I have two jobs A and B. Job B is executed after job A, but should NOT be executed if job A fails. What is the best way to implement this in (open source) Talend Data Integration?
Thanks in advance!
There exists tRunJob component. You can use trigger OnComponentOK/OnComponentError if the last component if the previous job finished successfully or you can define any other condition (If trigger).
See the documentation here:
I hope it helps you.
There are a multitude of ways of achieving this requirement. You've had a good way described by @lojdr already. However that relies on your jobs being contained by the same "wrapper" job. An alternative idea (and a slightly different way of thinking) is to have a logging table in a database. At the beginning and end of each of your jobs, you would log the start and end of a process. At the beginning of a job you would also check the status of any related jobs. If the status is acceptable for the job to continue, then you configure the job to carry on until the end. If the status is not suitable for the job to continue, then you end it at that point before any work is carried out.
Obviously what I have described is more complicated to implement, but it comes with some added advantages over wrapping all of the jobs into one big job. For example, you can add a job into the inter-linked process at a later date without having to modify your already running jobs. It's worth thinking about.
Other way can be to delegate the decision about the execution to a BAT/Powershell script which will take care of the execution of the second job.
E.g. at the successful end the first job creates a file and the second job will be executed only if this file exists (if condition in the BAT/PowerShell script).
Then you define only one task in Task Manager.
You need to consider what is suitable for you.
Thanks for all the replies. I will consider the three solutions, I incline using the powershell solution since I'll use a powershell script to start the different jobs.
Introduction to Talend Open Studio for Data Integration.
Practical steps to developing your data integration strategy.
Create systems and workflow to manage clean data ingestion and data transformation.