Question

I'm starting to learn Talend and I'm facing this problem: I have several ID's as an input and I want to make a lookup for each of these ID's to output the obtain data in a Json output.

Here's an image showing what I want to achieve:

http://i.stack.imgur.com/GLVLf.png

I have a tXMLMap with a lookup to the table where I want to find the villains from the villainID's list. The image shows how I can get the ID and Name for one of the villainID's and output it in it's respective json field but this method only works for one ID lookup at a time.

What's the best way to achieve this?

Thanks!

Was it helpful?

Solution

You should be able to copy your second input table 8 times and link all of those back into the tXMLMap component and link those by key as you already have done and join those up to where it needs to go in the XML mapping.

Alternatively you could use a tMap component in a previous step and use that to generate waveNvillainN's dispName by joining the id of your lookup table to all of the waveNvillainN's ids. This should then leave you with all of the necessary fields to populate the XML mapping.

OTHER TIPS

This is the way I could find out to solve this issue, I think it's the same that @garpitmzn and @ydaetskcoR meant but I'm not sure. This works perfectly and was easy to implement but I'd just hope there was a way to have less clutter of components.

http://i.stack.imgur.com/x3AHM.png

http://i.stack.imgur.com/PBeZn.png

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