Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Child job to update context variable

I need to pass a value from my parent job to the child job, update it and pass it back to my parent job. 

 

I'm okay if this is either through context variable or through global variable.

 

In this scenario, after I transmit the value I force to child job to fail ( tDie). But I still need the updated value in my main job.

 

Can anyone help on how to achieve the same ?

 

 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You cannot do this I'm afraid.

 

You can pass a context variable to a child job easily enough. 

You can pass the value back using a tBufferOutput component at the end of the child job. The value would need to be passed back as part of a datarow.

However, if you kill the child job with a tDie, it ends there and then. Why would you do this? You are essentially killing the Java execution of your program/job. You should only do this if you need the process to stop dead.

 

What you could try is sending the data back to the parent using the tBufferOutput and killing the job after this is done. That might work. The other thing you can try is to write the value out to a database or similar.

 

Unfortunately you cannot pass a context variable back to its parent without going through a convoluted process.

View solution in original post

1 Reply
Anonymous
Not applicable
Author

You cannot do this I'm afraid.

 

You can pass a context variable to a child job easily enough. 

You can pass the value back using a tBufferOutput component at the end of the child job. The value would need to be passed back as part of a datarow.

However, if you kill the child job with a tDie, it ends there and then. Why would you do this? You are essentially killing the Java execution of your program/job. You should only do this if you need the process to stop dead.

 

What you could try is sending the data back to the parent using the tBufferOutput and killing the job after this is done. That might work. The other thing you can try is to write the value out to a database or similar.

 

Unfortunately you cannot pass a context variable back to its parent without going through a convoluted process.