Support Questions
Find answers, ask questions, and share your expertise

convert csv to json,

New Contributor

I need to transform a csv file to a json file, the problem is that my csv has more fields than I need, and I do not select which columns I want to keep, to transform it

1 REPLY 1

Super Guru

You can use JoltTransformRecord for this, with a CSVReader and a JsonRecordSetWriter. If you want to choose which fields to include, you can use a Shift spec to select the fields. If you want to choose which fields to remove, you can use a Remove spec. See the Jolt documentation for more details, or if you can post some sample CSV input data and desired JSON output data, I can help you with the spec.