Hello, If you'd like to load data from CSV file to database table, 1.2.0 also has PutDatabaseRecord processor. Then you can configure PutDatabaseRecord to use CSVReader. Since you have your schema within incoming file as CSV header, no need to setup Schema Registry.
However, "random number of Columns" can be challenging I think. I've shared an example flow template here. https://gist.github.com/ijokarumawak/ddf8a67162a97d022e226c706d9f3386 Hope this helps, Koji On Wed, May 17, 2017 at 6:18 PM, [email protected] <[email protected]> wrote: > Hi All, > I am using nifi version 1.2.0. > > We have CSV files given by Vendor with random number of Columns in the file. > We want to save the contents of the File in Postgres Database. > > I have created a Flow with the following processors. > > GetFile-->ConvertRecord-->ConvertJSONToSql--->PutSql > > In ConvertRecord i have used CSVReader to read the record and > JSONRecordSetWriter. > > In JSONRecordSetWriter Controller Service is INVALID telling SCHEMA > Registry is invalid . How to fix it. > > I just want to take the CSV file column headers as name. > > Please Help > > > > > -- > View this message in context: > http://apache-nifi-developer-list.39713.n7.nabble.com/How-to-use-ConvertRecord-Processor-tp15873.html > Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.
