One Star

[resolved] Parse Multiple json documents from single file

I am trying to parse multiple json documents from a single file using following job design
tfileinputfullrow -> tfileinputjson - tmap - tfileoutputdelimited(csv)
Job is iterating through all the 16 rows in that in the file, but outcome is being substituting the first row unique id for the all the rows that is being generated. My file has 10 rows similar like where a uuid and name are different for each customer and may like multiple styles. please let me know ideas on how we can achieve it.

thanks
1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: [resolved] Parse Multiple json documents from single file

Hi
tFileInputJson is used to read data from a json file. In this case, I think you need to iterate each row and extract data from each row using tExtractjsonFields, the job looks like:
tfileinputfullrow -main--tFlowToIterate--iterate-- tFixedFlowInput-main-tExtractJsonFields- tfileoutputdelimited(csv)
tFixedFlowInput: generates the current row.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
3 REPLIES
Community Manager

Re: [resolved] Parse Multiple json documents from single file

Hi
tFileInputJson is used to read data from a json file. In this case, I think you need to iterate each row and extract data from each row using tExtractjsonFields, the job looks like:
tfileinputfullrow -main--tFlowToIterate--iterate-- tFixedFlowInput-main-tExtractJsonFields- tfileoutputdelimited(csv)
tFixedFlowInput: generates the current row.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Parse Multiple json documents from single file

Thanks Shong.. this worked perfectly. I'm marking this topic as resolved.
Community Manager

Re: [resolved] Parse Multiple json documents from single file

Great, thanks for your feedback.
----------------------------------------------------------
Talend | Data Agility for Modern Business