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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Passing value from child job to parent job

Hello, I've read dozens of threads and the tutorial (https://community.talend.com/t5/Design-and-Development/Passing-a-value-from-a-parent-Job-to-a-child-...) regarding this topic but I can't get it to work. I've tried using the globalMap variable but I just get a null object in the parent job (see screenshots). I also tried using context variables in the child job where I can get the correct value passed but I can't modify the initial value set in Contexts (number 2 in the screenshot). Either way works for me, I just need this true/false boolean in the child job to be available in the parent job. If someone could help me, it'd be greatly appreciated.

0683p000009M01t.png0683p000009M0Oa.png0683p000009M0Of.png

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I found the problem. I used tJavaRow to put the variable in the globalMap but the tJavaRow wasn't executed as I retrieved 0 rows which is why I got a null. Thanks to your confirmation that I did everything right I was able to find the problem. Thank you 0683p000009MACn.png

View solution in original post

12 Replies
TRF
Champion II
Champion II

You need to use a tBufferOutput in the child job to push the informations you want to return to the parent job.

The schema of the tBufferOutput must be the same as the one which is declared for the tRunJob.

Anonymous
Not applicable
Author

I'm using a tBufferOutput in the child job as seen in the screenshot. The schema is also identical, see additional screenshots0683p000009M05j.png0683p000009M0Iy.png

Anonymous
Not applicable
Author

I did the steps as followed in the tutorial which are relevant for me as stated in my opening post. Only difference is that instead of a fileInput I only take one variable which will be set dynamically depending on if-statements in the tJavaRows.

TRF
Champion II
Champion II

Try to change the datatype for the mailSent global variable from Object to Boolean

Anonymous
Not applicable
Author

If I do that, I need to do a typecast in the tFixedFlowInput like in the screenshot. The result in the parent job is still null so it doesn't change anything. I changed the type in all components.

0683p000009M0Op.png

TRF
Champion II
Champion II

What about the schema of the tRunJob component?

Anonymous
Not applicable
Author

I changed the type there like I wrote

0683p000009M0Ou.png

TRF
Champion II
Champion II

Everything looks fine.

I do the same thing for a lot of jobs with no problem.

Can find why it doesn't work for yours.

Sorry 0683p000009MPcz.png