Get global value from child job.

One Star

Get global value from child job.

I have a child job, in it i defined a global value and changed it. then I want to use globalMap.get("variable") in parent job, talend returns java.lang.NullPointerException.
The job is simply like tRunjob_1(child)-----onSubjobok------tJava_1, i use globalMap.get in tJava1, return this error.

Community Manager

Re: Get global value from child job.

Hi 
The effective range of global variable is limited to the job itself, you can't access a global variable in other job. To define a variable that can be accessible for all job, refer to this article.
https://help.talend.com/pages/viewpage.action?pageId=190513260

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog