One Star

wait for multiple subjobs to finish before continuing

Hi,
I have a job that contains several subjobs that unload data from database. It also contains another subjob that will process these data in flat files. Before the processing starts, it has to wait for data unloading to finish. What can I do to make sure that all data unloading have been finished before the processing subjob starts?
7 REPLIES
One Star

Re: wait for multiple subjobs to finish before continuing

There's a component in the enterprise version of of TOS that does this - tParallelize. I don't think there's anything similar in open source TOS, so I think you would have to run the unloading subjobs in sequence, rather than in parallel, to ensure that all are complete before moving to the next operation.
Seven Stars

Re: wait for multiple subjobs to finish before continuing

You can also put the unloading subjobs into one job that is set for multi-thread execution (see Job/Extra tab) and then call that job in another job using a tRunJob linked with OnSubjobOK to the processing subjob.
One Star

Re: wait for multiple subjobs to finish before continuing

Thanks, will try that out. Alternatively, I did a bunch of onComponentOk and it seems to work fine.
Seven Stars

Re: wait for multiple subjobs to finish before continuing

OnSubjobOKs would probably be better but, yes, that will work although you lose the ability to parallellise the unloading.
One Star

Re: wait for multiple subjobs to finish before continuing

i was getting such figures 0000000-4538795 in my output what can i do on talend to have the negative before zero? -00000004538795
Four Stars

Re: wait for multiple subjobs to finish before continuing

Hi wilsonotieno46,
is this a string value?
If it is a string value, then you can do string handling, use EReplace to remove "-" and then concatenate "-" with the existing string after replacement...
Vaibhav
One Star

Re: wait for multiple subjobs to finish before continuing

You can also try a tPostJob. It will run a final subjob after all other components are complete.
Documentation: