Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have deployed a job that calls several sub-jobs. Like this :
In Studio this works fine. The context variables that I have declared and provided with values, are used whithout any problem.
When running the same job from TMC, having initialized the connections, like this:
filled the parameters for the job, I get an error message like this :
This is unexpected behavior for me. Like I said, in Studio it runs fine. When I deploy the first job separate, configure it in TMC and run the task, there is no problem. So why doen't this work from the main job which starts the sub-jobs ?
Hope my story makes sense and you guys have an answer.
Thanks in advance.
Jacco
Hello,
Select this "Transmit whole context" check box to get all the context variables from the parent Job. Deselect it to get all the context variables from the child Job.
If a Job containing connection parameters is to be called by another Job via the tRunJob component, make sure that:
If you can't select this option there is indeed a solution, here is the "Use dynamic context for subJob" option in advanced settings of tRunJob. Select this option to specify a context variable group for the subJob to be called. After selecting this option, enter a variable name in the text field to the right of this option. Note that the value of the variable needs to be the name of an existing context variable group.
Here is the related component reference about tRunjob.
Hope it helps.
https://help.talend.com/r/en-US/8.0/system/trunjob-standard-properties
Best regards
Sabrina
Hello,
We suspect there might be something wrong with your Context Variable when publish your job in TMC.
Please make sure that you did correct configuration in the TMC connections.
Could you please post your Context variable setting screenshot here and mask your sensitive data?
Best regards
Sabrina
@Xiaodi Shi thanks for responding!
When I looked again at the job-configuration and it appears the I didn't check the option "Transmit whole context". After setting this checkbox, it works !
But to my understanding, every job has it's own context variables and 'Default context environment'. So when calling a sub-job from a main-job, the sub-jobs should use that context (and it's variables) set in that sub-job. In that way, setting the checkbox should not be necessary.
Perhaps my understanding is wrong . . . .
Hello,
Select this "Transmit whole context" check box to get all the context variables from the parent Job. Deselect it to get all the context variables from the child Job.
If a Job containing connection parameters is to be called by another Job via the tRunJob component, make sure that:
If you can't select this option there is indeed a solution, here is the "Use dynamic context for subJob" option in advanced settings of tRunJob. Select this option to specify a context variable group for the subJob to be called. After selecting this option, enter a variable name in the text field to the right of this option. Note that the value of the variable needs to be the name of an existing context variable group.
Here is the related component reference about tRunjob.
Hope it helps.
https://help.talend.com/r/en-US/8.0/system/trunjob-standard-properties
Best regards
Sabrina