Question

How can I pass an array from a ChildJob to a ParentJob?

The array values came from : tExtractXMLField -> tFlowToIterate.

I've done it by using a Routine (like this: https://help.talend.com/pages/viewpage.action?pageId=5671107), but I'm interesting in another approach, where Routines are no needed.

Was it helpful?

Solution

This could be very very tricky, since the only way to pass variables to a subjob is through context vars, which are Strings.

You can concat the elements of the array (in a tJavaRow, for example) and then feed a String context var to pass and split() and cast inside the child job. It's a quick-and-dirty solution, but only suitable for small arrays, obviously.

I'm afraid the official KB you linked is the most advisable way to do it, even if you need a user routine

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top