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?

Explorer
 
1 ACCEPTED SOLUTION

Super 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

Super 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.

Explorer

Thanks @Matt Burgess

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.