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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
NNot_defined1675001307

Convert data from single CSV file to multiple JSON files using Talend

I have below data in CSV file.

studentid,studentname,studentcity,studentmarks,studentcountry

1,john,blore,34,india

2,ham,blore,98,india

3,james,blore,93,india

I am able to transform above CSV to single JSON file using tFileOutputJSON.

How to convert data from each row of single CSV file to multiple JSON files using Talend. For the above data, for each row, a JSON file should be created.

Thanks in advance.

Labels (4)
3 Replies
RMotta2408
Creator II
Creator II

Hi there,

 

I think you can solve your problem by reading the CSV file and then connecting the component tFileInputDelimited to tFlowToIterate. For each record, you will then generate a JSON file with tFileOutputJSON.

In order not to overwrite the JSON files, you can choose to add the current Datetime to its name and may use the name of the student to use in the file name as well.

Something like this: StudentName_CurrentDateTime.json

RMotta2408
Creator II
Creator II

Something like this (in this case, the CSV has only NAME and SURNAME):

 

0695b00000qR5RjAAK.png 

0695b00000qR5aLAAS.png 

RMotta2408
Creator II
Creator II

The JSON file names will be something like this:

 

0695b00000qR5cgAAC.png 

i.e. Assuming one of the records has as name "Rui" and as surname "Motta", the JSON file path and name will be "C:/Users/Rui/workspace/Rui_Motta.json"