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
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)