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

69 Views Asked by At

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.

Thanks in advance.

1

There are 1 best solutions below

0
Emile Dadou On

For something like that, I usually use a tFlowToIterate to process the csv files row by row, like this :

enter image description here

I then store the data in globalVar using the tFlowToIterate :

enter image description here

and then I use the ID (globalVar) in the filename to split the data in multiple files :

enter image description here