Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
RA6
Creator
Creator

Retrieving values from subjobs

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

0683p000009M6NC.png

 

 

JobB

0683p000009M6hG.png

 

 

JobC

0683p000009M6Wn.png

 

Problem:
I want to get the value of context.execStart that was defined in JobB but the value that i am getting is empty:
0683p000009M6eN.png

 

 

Can you advise please?

Thank you.

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

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://community.talend.com/t5/Design-and-Development/resolved-how-to-pass-a-context-from-child-job...

 

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 🙂

View solution in original post

4 Replies
Anonymous
Not applicable

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 🙂

RA6
Creator
Creator
Author

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.


JobA.zip
Anonymous
Not applicable

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://community.talend.com/t5/Design-and-Development/resolved-how-to-pass-a-context-from-child-job...

 

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 🙂

RA6
Creator
Creator
Author

Thank you 0683p000009MACn.png
It works using tbufferoutput in childjob and tjavarow in parentjob while copying the child job schema.