Back to Browse

How to convert CSV data into JSON in Apache NiFi

34.8K views
May 7, 2018
11:51

How to convert CSV data into JSON in Apache NiFi http://www.aodba.com Csv to Json 1 - GenerateFlowFile first_name,age adrian,12 aodba,10 schema.name: personvalues 2 - Convert Record Converts between formats and/or like schemas. For example, conversion from CSV to Json can be performed by configuring ConvertRecord with a CsvReader and an JsonRecordSetWriter. called "CSV2JSON AvroSchemaRegistry" { "name": "person", "namespace": "nifi", "type": "record", "fields": [ {"name": "first_name" , "type" : "string"}, {"name": "age" , "type" : "int"} ] } https://json-schema-validator.herokuapp.com/avro.jsp create CSVReader called "CSV2JSON CSVReader" create JsonRecordSetWriter called "CSV2JSON JsonRecordSetWriter" 3 - logattribute [ { "first_name" : null, "age" : 12 }, { "first_name" : null, "age" : 10 } ] apache nifi | nifi hadoop | nifi processors | nifi | nifi examples | nifi etl | apache nifi example

Download

0 formats

No download links available.

How to convert CSV data into JSON in Apache NiFi | NatokHD