Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
RodBoni8587
Contributor
Contributor

Unable to pass context variables between Parent Job and SubJob

Hello Community,

I hope you are doing well.

I'm new to Talend and I need your help. I've been working on a Talend Job using Snowflake. Within this job, I have a sub Job that includes a tDBROW component that executes a stored procedure. This procedure expects certain context variables to be utilized in the call to the Store Proc.

This is the SubJob

069U1000001ljh3IAA.png

The SubJob is working as expected. However, an issue arises here:

The idea is to define these variables in the tRunJob component to use them in the child Job Execution.

069U1000001ljltIAA.png

I have defined the context variables in the SubJob with the same names, and I'm expecting to use the values that I defined here. However, I'm encountering the following error.

069U1000001lhgsIAA.png

When I run the SubJob independently, it works, and I get the data inserted. But if I run the parent job, things break. I wanted to know if anyone has faced this type of issue and can provide me with a hint on how to resolve it.

Thanks,

RB

Labels (3)
4 Replies
Anonymous
Not applicable

Hi

It is NullPointerException error, one variable is null value however it shouldn't.

In child job, print the value of these context variable before they are used to see if the values are passed correctly from parent job.

 

Regards

Shong

 

RodBoni8587
Contributor
Contributor
Author

Is there's any specific configuration I should change in order to move those context variables ?

Anonymous
Not applicable

I see you have checked the 'transmit whole context' box on tRunJob, so you don't need to specify these context variables in the table list.

069U1000001oRPSIA2.pngWith this option is enable, the value of context variables from patent job will be passed automatically to child job's variable which have the same name.

 

konvertilo
Partner - Contributor III
Partner - Contributor III

Hello,

you must ensure that the checkbox on the tRunJob to indicate you want to run the subjob in a separate VM is UNchecked. If it is checked, then the 2 differents JVM will not be able to share any values and the only way to retrieve values from the subjob is to write the context down to a file a re-read it from the master.