Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Ingest data from a csv without header row into postgresql database using Nifi

avatar
Explorer

I am trying to use putdatabaserecord record processor to migrate data from a csv without header row or the column names into the database using putdatabaserecord processor.

 

I get this error: none of the columns in csv are mapped to the table columns

1 REPLY 1

avatar

hi @Ytch ,

To use the PutDatabaseRecord you need to have the column names defined in whatever input format you have (CSV, Json....etc.) and the column name should match what is in the DB table ( see also the "Translate Field Option" if not exactly the same). If you know the column order in the CSV file you can add a header using the ReplaceText processor as described here:

https://community.cloudera.com/t5/Support-Questions/How-to-add-customer-headers-to-csv-file-in-NIFI/...

 

If you find this is helpful please accept solution.

Thanks