Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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