Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Pass value from child job to parent job both running as independent process

Hi,

 

Googling gives me to return value from child to parent job both running under same process through buffered output.

 

My design is from parent job I am running parallel child job, where every child job will run as separate process(for max utilizing of resources to process huge volume of tables) and has to return the last processed id back to parent job.

 

Could you kindly suggest how this can be achieved.

 

Thank you

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

You need to use a file to pass values from child job to parent when running as an independent process.

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Hi,

 

I have also tried routines with static variables.

package routines;

public class testMyRoutineDemo {
public static String myLastProcessedID_1;
public static String myLastProcessedID_2;
}

 

Populated the value in child job:

routines.testMyRoutineDemo.myLastProcessedID_1 = "123"

 

In parent job:

in tJava - 

System.out.println("last_customer_id=" + routines.testMyRoutineDemo.myLastProcessedID_1);

 

Could you kindly suggest.

 

Thanks.

 

Anonymous
Not applicable
Author

I am attaching the screenshot of the flow.

Please suggest if there is a possibility to pass value from child job to parent job running as independent process.

 

Thanks

 

 


Parent job.docx
TRF
Champion II
Champion II

You need to use a file to pass values from child job to parent when running as an independent process.
Anonymous
Not applicable
Author

Will it be possible to share through temporary file?
TRF
Champion II
Champion II

Why not, as soon as you don't select the "Remove file when execution is over" option.
In this case, the parent job will be in charge to delete this file.
For lisibility, I prefer the parent to pass filename in which the child job will have to put data.