difference between dynamic jobs and independent processes for tRunJob

One Star

difference between dynamic jobs and independent processes for tRunJob

Can anyone clarify when you would use dynamic jobs versus independent processes.
I'm trying to start three jobs in parallel (but until i get tParallelize, i'm stuck with looping).
I'm considering two different ways of doing it:
X -> tRunJob(dynamic jobs) : run 3 jobs
versus
X -> tRunJob(independent process)
-> tRunJob(independent process)
-> tRunJob(independent process)

-------------
From the component page:
dynamic jobs: "Select this check box to allow multiple Jobs to be called and processed. When this option is enabled, only the latest version of the Jobs can be called and processed. An independent process will be used to run the subjob. The Context and the Use an independent process to run subjob options disappear."
However, for me, Context does not disappear. Is that a bug? In fact, there is a box next to the dynamic checkbox called Context Job and then the Context field below. This is confusing. Must i run the same context for all jobs? What's the difference between Context Job and Context?
Why is this called dynamic job?
And finally, is there any difference between the two methods shown above?
thanks
kesten

Re: difference between dynamic jobs and independent processes for tRunJob

Can anyone clarify when you would use dynamic jobs versus independent processes.
I'm trying to start three jobs in parallel (but until i get tParallelize, i'm stuck with looping).
I'm considering two different ways of doing it:
X -> tRunJob(dynamic jobs) : run 3 jobs
versus
X -> tRunJob(independent process)
-> tRunJob(independent process)
-> tRunJob(independent process)

-------------
From the component page:
dynamic jobs: "Select this check box to allow multiple Jobs to be called and processed. When this option is enabled, only the latest version of the Jobs can be called and processed. An independent process will be used to run the subjob. The Context and the Use an independent process to run subjob options disappear."
However, for me, Context does not disappear. Is that a bug? In fact, there is a box next to the dynamic checkbox called Context Job and then the Context field below. This is confusing. Must i run the same context for all jobs? What's the difference between Context Job and Context?
Why is this called dynamic job?
And finally, is there any difference between the two methods shown above?
thanks
kesten

Hi Kesten,
Below are the answers to some of your questions:
Q) What's the difference between Context Job and Context?
A) Context Job - is the field where you can put the Name of the SubJob (using context/global variables) which you want to Run dynamically provided they are selected in the tab named "Job" just below it.
Context - is the context group you want to Run for all the subjobs.
Q) Must i run the same context for all jobs?
A) Yes, all the subjobs will run with the same context groups if present, but if the context group (say for e.g. Dev or Test) is not Present in any one of the subjobs then Talend picks the Default Context group.
NOTE: The Context Param field gets disabled if more than 1 Job is selected in the Job's tab. So, to transfer the context variables from Parent Job to child Job use the "Transmit whole context option". This option will transmit all the context from Parent Job to subjobs whose variable name matches.
I have attached a screenshot of a sample Job which triggers two subjobs selected dynamically and in parallel (You can enable parallel execution in the iterate flow when you call the subjobs) and transfers different context variables to each of the two subjob and prints their values.
Lastly, if you want to Run multiple different Job in Parallel some of the options are:
1. As explained in the attached screenshot, You can enable parallel execution in the iterate flow when you call the subjobs.
2. Call them in a subjob where you can keep all the different subjobs hanging (without any input links) and enable the Multi thread Option under the Job tab.

Warm Regards,
Diwakar Nahata
InfoCepts Team