Support Questions

Find answers, ask questions, and share your expertise

How to convert a ',' comma separated file/text file into JSON format in apache nifi?

avatar
Contributor
 
1 ACCEPTED SOLUTION

avatar
Master Guru

As of NiFi 1.2.0 (via NIFI-3658), you can use ConvertRecord to achieve this. You would configure a CSVReader to match your CSV format (comma-delimited, possibly other config options around header line, quotes, etc.) and a JSONRecordSetWriter to output JSON.

Prior to NiFi 1.2.0, you could use ConvertCSVToAvro -> ConvertAvroToJSON.

View solution in original post

2 REPLIES 2

avatar
Master Guru

As of NiFi 1.2.0 (via NIFI-3658), you can use ConvertRecord to achieve this. You would configure a CSVReader to match your CSV format (comma-delimited, possibly other config options around header line, quotes, etc.) and a JSONRecordSetWriter to output JSON.

Prior to NiFi 1.2.0, you could use ConvertCSVToAvro -> ConvertAvroToJSON.

avatar
Contributor

Thanks @Matt Burgess