Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend Open Studio for Big Data: How to input JSON records and output same number of records in XML

Hello, Newbie here. I'm trying to get the same number of records I ingested on the JSON file on my XML output. I'm doing something wrong! what is it? Pretty sure it's something really simple, but this being my first time, I fail to see it. Note that I did a lot of research, to no avail. I'm hoping you can help me here!! TIA very much!!

 

JSON:

 {"patientCollection":[{"patient_id" : "370fd70",
"name" : {"family" : "Sommers", "given" : "Jane"},
"phone" : "1-223-223-87476 x 320",
"address" :{"streetAddressLine1" : "35108 Palms Junction", "streetAddressLine2" : "Apt. 436","city" : "Miami","state" : "FL", "postalCode" : "00002","country" : "US" }
},
{"patient_id" : "370fd90",
"name" : {"family" : "Jones","given" : "Sarah" },
"phone" : "1-703-246-3200",
"address" :{"streetAddressLine1" : "3491 Saffron Circle","streetAddressLine2" : "Apt. 130","city" : "Arlington","state" : "VA", "postalCode" : "00007", "country" : "US" }

} ]} 

Resulting XML: the 2 records in one tag. I need to separate and put each patient data in separate tags)

0683p000009M3OO.jpg

These are the screenshots of my work:

0683p000009M3OY.jpg

 

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

     Please refer the details below.

0683p000009M3RX.png

The component details are as below.

0683p000009M3Rc.png

 

Output component is as below.0683p000009M3Rh.png

0683p000009M3Rm.png

 

0683p000009M3Rw.png

 

Output is as shown above. Hope I have answered your query.

 

Please remember to mark the topic as resolved as it will help others in Talend community.

Kudos will be a bonus from your end 🙂

 

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 🙂

 

View solution in original post

4 Replies
Anonymous
Not applicable
Author

Hi,

 

   Could you please first print and check whether the output of JSON file read is giving correct output?

 

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 🙂

Anonymous
Not applicable
Author

Oh! I don't know how to do this....All I can see is the fields in the map and those are correct, and the previewer as in this picture. I hope this helps to answer my question....?: 

0683p000009M3LL.jpgy

Anonymous
Not applicable
Author

Hi,

 

     Please refer the details below.

0683p000009M3RX.png

The component details are as below.

0683p000009M3Rc.png

 

Output component is as below.0683p000009M3Rh.png

0683p000009M3Rm.png

 

0683p000009M3Rw.png

 

Output is as shown above. Hope I have answered your query.

 

Please remember to mark the topic as resolved as it will help others in Talend community.

Kudos will be a bonus from your end 🙂

 

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 🙂

 

Anonymous
Not applicable
Author

Thank you so much! I was able to run it with your advice.

M.