Refresh value context in other job

Highlighted
Four Stars

Refresh value context in other job

I have a loop in job1 that will execute job2 while a boolean context does not change value in job2. This boolean context will only be modified in job2, how do I loop the job1 to recognize the context value that will be updated in job2? Could you give me an example of how to do this?


Accepted Solutions
Highlighted
Five Stars

Re: Refresh value context in other job

Hi,

 

Can you elaborate you problem statement. Sorry,I Couldn't understand it properly.

You have to iterate a job based on a boolean variable?

 

Thanks,

 Jay

View solution in original post

Highlighted
Community Manager

Re: Refresh value context in other job

You can't directly update a context variable from child to parent. In order to do so, you will need to use a tBufferOutput component in your child job. This is used to pass a data row out of your child job. The idea would be to send your boolean value out of the child job in this row and use it to set your parent job's context variable. This will then stop the loop in the parent job.

 

Take a look here for documentation on the tBufferOutput

View solution in original post


All Replies
Highlighted
Five Stars

Re: Refresh value context in other job

Hi,

 

Can you elaborate you problem statement. Sorry,I Couldn't understand it properly.

You have to iterate a job based on a boolean variable?

 

Thanks,

 Jay

View solution in original post

Highlighted
Community Manager

Re: Refresh value context in other job

You can't directly update a context variable from child to parent. In order to do so, you will need to use a tBufferOutput component in your child job. This is used to pass a data row out of your child job. The idea would be to send your boolean value out of the child job in this row and use it to set your parent job's context variable. This will then stop the loop in the parent job.

 

Take a look here for documentation on the tBufferOutput

View solution in original post

Six Stars

Re: Refresh value context in other job

Hi Felipe

 

I send an example 

 

Kind regards,

 

 

Alfonso Borré

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