Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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.
I'm using a tBufferOutput in the child job as seen in the screenshot. The schema is also identical, see additional screenshots
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.
Try to change the datatype for the mailSent global variable from Object to Boolean
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.
What about the schema of the tRunJob component?
I changed the type there like I wrote
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