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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

globalMap and child job

Hello,
I need to transfer a list of job value of a father to a child job.
I read the topic 'https://community.talend.com/t5/Design-and-Development/setting-the-value-of-a-context-variable-of-ty...' but it does not work.
For testing I created a father job: tJava -> tRunJob. TJava contains "globalMap.put ("String","A")"
The child job: tJava with "System.out.println ("Sous job = " (String)globalMap.get("String"))"
When I run the father job it is displayed in the console the following message:
Démarrage du job a a 17:34 22/08/2013.
connecting to socket on port 4025
connected
Sous job = null
disconnected
Job a terminé à 17:34 22/08/2013.
Thank you for your help
TOS Data Integration 5.2.1
Labels (3)
3 Replies
Anonymous
Not applicable

The child Job has no visibility of the parent's globalMap.
The easiest thing for you to do is to create a context variable in your child job and then pass the value.
You can pass the value through tRunJob->Basic settings
E.g.
Parameter Value
myString (String) globalMap.get("String")
And then, in your child Job
System.out.println ("Sous job = " + context.myString)
Anonymous
Not applicable

Hi,
Please read KB article about TalendHelpCenter0683p000009MAB6.pngassing a value from a parent Job to a child Job.
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III
Author

Thank for your quickly reply.
I test your solution xdshi.
But Shong