Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys,
I am new to talend and i am having some difficulty to retrieve some value.
Suppose, I have 3 jobs:
JobA
JobB
JobC
On execution, JobA calls JobB and JobB calls JobC with tRunJob.
JobA
JobB
JobC
Problem:
I want to get the value of context.execStart that was defined in JobB but the value that i am getting is empty:
Can you advise please?
Thank you.
Hi,
You will not be able to do it directly. You will have to pass the value back from child to parent using tBufferOutput and then assign these values back to parent context variables.
https://help.talend.com/reader/wDRBNUuxk629sNcI0dNYaA/yh_GCK7WMATxbOSlI_Ck1Q
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hi,
In all the jobs, you are calling tJavarow after tRunJob. Since the job will be executed in a sequential way, the control will first flow to JobC tjava and then to JobB tjava and finally to JobA tjava.
If you have to pass the values from parent to child job, you will have to select "Transmit whole context" option and it will pass the context variables from parent to child. There are multiple resolved posts already in the Talend community about passing variables between parent to child and vice versa. I hope they will help you in this matter.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Hello @ninikhilthampi,
You are right; the job will be executed in a sequential way, the control will first flow to JobC tjava and then to JobB tjava and finally to JobA tjava.
But I am not using tJavarow but only tjava just to check the order of the flow and to output the context value in JobA and jobB in the console.
Suppose JobA is the parent and jobB is the child and if i want to pass context value from parent to child, i must use "transmit whole context".
I have tested it and it works.
But what i want to do is to retrieve the context value that was defined in jobB to jobA. Why i am getting blank value? The context should be available across all jobs. Right?
Can you send me some link please?
I have attached the job just in case.
Hi,
You will not be able to do it directly. You will have to pass the value back from child to parent using tBufferOutput and then assign these values back to parent context variables.
https://help.talend.com/reader/wDRBNUuxk629sNcI0dNYaA/yh_GCK7WMATxbOSlI_Ck1Q
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂