[resolved] Parse Multiple json documents from single file

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

Accepted Solutions
Highlighted
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

All Replies
Highlighted
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

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

I am facing the same issue. Can u please share the component details for tFixedFlowInput and ExtractJsonFields.

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.