[resolved] How to pass values from child job to parent job

Highlighted
One Star

[resolved] How to pass values from child job to parent job

Hi,

I would like to ask for anyone's help here:
I have this setup:
Main:
tRunJob1
|
|(on subjob ok)
|
tRunJob2

tRunJob1:
tJava
|
| (row main)
|
tBufferOutput
Now, I have to set the value in tJava, say msg="hello", how can I access that in tRunJob2?

Thanks,
Brevis Iunius

Accepted Solutions
Highlighted
Community Manager

Re: [resolved] How to pass values from child job to parent job

Hi
Using the context variable, let's say there is a context variable called name both in main job and tRunJob2,
Main:
tRunJob1--main--tJavaRow
|
|(on subjob ok)
|
tRunJob2
on tJavaRow:
context.name=input_row.name;
For more details, see
http://www.talendforge.org/forum/viewtopic.php?id=1654
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

View solution in original post


All Replies
Highlighted
Community Manager

Re: [resolved] How to pass values from child job to parent job

Hi
Using the context variable, let's say there is a context variable called name both in main job and tRunJob2,
Main:
tRunJob1--main--tJavaRow
|
|(on subjob ok)
|
tRunJob2
on tJavaRow:
context.name=input_row.name;
For more details, see
http://www.talendforge.org/forum/viewtopic.php?id=1654
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

View solution in original post

Highlighted
One Star

Re: [resolved] How to pass values from child job to parent job

Thank you very much shong! You're so good. It worked nowSmiley Happy
Brevis Iunius

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 2

Part 2 of a series on Context Variables

Blog

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