[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
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
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.

Six Stars

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

Hello @shong ,

can you please share the configuration for tFixedFlowInput and tExtractJsonFields

Regards,
Yogesh.

 

Community Manager

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

@kuwaryogi27, This topic was a little old, I don't have the job any more. Please refers to the component documentation if you don't know how to uses these components, open a new thread if you have any questions or meet any issue. 

 

----------------------------------------------------------
Talend | Data Agility for Modern Business
Six Stars

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

@shong , Okay creating a new thread please guide me for the same.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch