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.
For something like that, I usually use a tFlowToIterate to process the csv files row by row, like this :
I then store the data in globalVar using the tFlowToIterate :
and then I use the ID (globalVar) in the filename to split the data in multiple files :