[resolved] accessing value of global variable set by joblet
Hi all, I have global variable. The value was set in joblet. Now how can I access the value of that global variable in main job? I can see the value in joblet but I get null value in main job Cheers!
Hi Foxtrot,
I am hoping that one of the two below listed will help you out.
-> getting a global value from the map can be done as follows... (String)globalMap.get("globalVariableName"); In this example, the name of the variable is called globalVariableName
and it is a type String. A note that you will need to cast the field to its type.
-> If you set the field as a context type, you can load it and access it via the context variable list. A thought.
My disclaimer... I am new to Talend myself. That said, I have used the above two methods when accessing values.
Regards,
Tom
Hi Foxtrot,
I am hoping that one of the two below listed will help you out.
-> getting a global value from the map can be done as follows... (String)globalMap.get("globalVariableName"); In this example, the name of the variable is called globalVariableName
and it is a type String. A note that you will need to cast the field to its type.
-> If you set the field as a context type, you can load it and access it via the context variable list. A thought.
My disclaimer... I am new to Talend myself. That said, I have used the above two methods when accessing values.
Regards,
Tom