Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Talend and couldn't figure out the solution to my issue on the forum.
I have a job attached below.
In txmlmap, I have generated an output in the form of JSON/XML which is attached below with the name of "output_for_API".
For now, its generating a consolidated file like:
<row>
<body><StockUpdate><locationDetail><location>0102</location><event_time>2019-07-04</event_time></locationDetail><quantity_list><gtin>615</gtin><quantity>1</quantity><exclude>false</exclude></quantity_list></StockUpdate></body>
</row>
<row>
<body><StockUpdate><locationDetail><location>0102</location><event_time>2019-07-04</event_time></locationDetail><quantity_list><gtin>2330</gtin><quantity>2</quantity><exclude>true</exclude></quantity_list></StockUpdate></body>
</row>
<row>
<body><StockUpdate><locationDetail><location>0778</location><event_time>2019-07-04</event_time></locationDetail><quantity_list><gtin>2730</gtin><quantity>-1</quantity><exclude>false</exclude></quantity_list></StockUpdate></body>
</row>
<row>
<body><StockUpdate><locationDetail><location>0102</location><event_time>2019-07-04</event_time></locationDetail><quantity_list><gtin>9552</gtin><quantity>1</quantity><exclude>true</exclude></quantity_list></StockUpdate></body>
</row>
<row>
Now, I have two issues. Firstly, for each location (e.g <location>0102 ) I need quantity_list to be an object which contains (gtin, quantity and exclude) as its members.
(one location should appear only once)
So, the required format is:
2ndly, after getting output like above, I need a file per location to feed the API;Not a consolidated file.
In the attached job, output_for_API in txmlmap is going to the tfileoutputDelimited, but it's just for testing. In actual, data will be going to the API.
Thanks for any help.
Hi @eman
Please do not create duplicate posts for the same query as it will only slow down the request. Since you have already one post as shown below, please stick to it.
https://community.talend.com/t5/Design-and-Development/How-to-pass-data-to-ta/m-p/166408#M101053
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂