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.

Était-ce utile?

La 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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top