shaahiin
shaahiin

Reputation: 1375

How to synchronize two subjobs while using Multi Threaded execution in a Talend job?

I'm using Talend Open Studio for Big Data, and I wanted to know how do we synchronize two subjobs which are executed in a job with multi threaded execution.

I want to execute two child jobs parallelly, and only after these two jobs have finished execution, I want to execute a third job. Basically, execute Job3, only after Job1 and Job2 have finished execution.

I know I can use tParallelize and Synchronize to achieve this, but I'm not using Talend Enterprise edition.

There seems to be less light on this topic so any help would be appreciated.

Thanks!

Upvotes: 1

Views: 905

Answers (1)

Ibrahim Mezouar
Ibrahim Mezouar

Reputation: 4051

Here's a solution :

Wrap your 2 child jobs in a parent job, and enable mutlithreaded execution on it (Go to Job tab > Extra > Check Multi thread execution).

enter image description here

Then in another job (grand parent job), call the job that wraps your 2 child jobs (parent job) in a tRunJob, and OnSubjobOk, call your 3rd child job.

enter image description here

When you run the grand parent Job, it will run parent job which itself runs the 2 child jobs in parallel, and when it ends, it will call the 3rd child job.

Upvotes: 2

Related Questions