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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
gadje1
Creator
Creator

Transfer context value from main job to subjob

Hi everybody,

I would like be able to transfer context value from a job to subjobs.
This is my main job below and i want that my subjobs are able to use my context "Site" that i defined i my main job.

[1] tMsgBox that take my value, [2] The subjobs that i want to passe context.Site value, [3] My context.Site

0683p000009M6UM.jpg

 

Below this is my tJava code with the value of context.Site bring from a tMsgBox in "Question mode" :

0683p000009M6LG.jpg


is there anybody who knows how to do that ?
Thanks a lot in advance.

 

Labels (2)
3 Replies
Anonymous
Not applicable

You need to set up the context variable in the child job and then use the tRunJob settings to assign the value. How to do this can be seen here....
https://help.talend.com/reader/jomWd_GKqAmTZviwG_oxHQ/ICv6hRE2pgpUtQFvQDmxkg

You are looking for this image...
0683p000009M6YT.png

In the situation above, a context variable called "File" within the child job is being assigned the value of the globalMap variable. If you simply want to pass the value of the context.File variable of your main job, you simply use ....

context.File

.....in the "Values" field.

gadje1
Creator
Creator
Author

 
Hello Rhall_2_0,
sorry for the delay of my answer and thank you for yours. in fact, I would like to run the "job child 2" or the "job Child 3" depending on the value of a context value from the "Job Child 1".
I don't know how to pass the value from this context to my "run If" trigger.

My main job job look like this :
0683p000009M8Bd.jpg
My job Child look like this :
0683p000009M8Bi.jpg
thank you.

akumar2301
Specialist II
Specialist II

You need set master job site context from child 1 job and then use it in run if.

Search for how to pass value from child to parent. There are many posts. Buffer components will help.