One Star

Passing context parameters in a tRunJob

My Talend Job is made up of a control job with four tRun Jobs as children below.
Effectively: Control (TrunJob1) --> TrunJob2 (calls TrunJob3) --> TrunJob3 (calls TrunJob4) --> Trunjob4
(These are jobs wrapped within jobs, not four tRunJobs in one Job)
The context groups are set from the top to bottom. The "transmit whole context" option is ticked at every turn.
In the Trunjob4 there is a tFileRowCount component with the contexts set to look at a file under a directory:
e.g. context.Source_Dir+context.Source_Filename_Control
For some reason it is saying access is denied: C:\\Input (Access is denied)
                at Method)
There are no access issues. If I run this from TrunJob 2 with hardcoded values in the .properties values this works.
Can anyone make any suggestions of what might be wrong?
Community Manager

Re: Passing context parameters in a tRunJob

Hello C:\\Input

It is a directory rather than file path, it seems the value of context.Source_Filename_Control is not passed correctly from parent job. For testing, try to print the value of context.Source_Dir and context.Source_Filename_Control in tRunJob4 to see if they are correct or not.

Talend | Data Agility for Modern Business
One Star

Re: Passing context parameters in a tRunJob

Thanks Shong yeah it seems the contexts aren't passing through.
I've simplified this a bit more.
In tRunJob (1) (where contexts are initialised) I am trying to take out the contexts so I can pass them to tRunJob2 in the following way.
1) In TRunJob1 I have a subjob with
tFixedRowInput --> tMap --> tBufferOutput (in Tmap I have made a 'contextOut' schema with the context values I need)
2) Outside the TRunJob I output this to a tlogRow by seelcting the 'copy Child Job Schema' and output the values to a tlogRow. This is successful.
3) So now I have:
tRunJob 1 ---> tLogRow
so now I got the values out how do I pass these values from one TrunJob1 to TRunJob2? I have selected the 'contextOut' schema in the TrunJob settings but that doesn't work.
(This is the free version so I can't use joblets, which might make a difference)