Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
I am trying to read a csv file and put those records into a postgres table. To do it, I have used some tips given Loading a simple CSV file using nifi.
My template is :
GetFile -> UpdateAttribute -> PutDatabaseRecord
In UpdateAttribute I have used `schema.name` -> `postgres database`
In PutDatabaseRecord ->
CSVReader
AvroSchemaRegistry
DBCPConnectionPool
My CSV file
```
userid,username
1,'sachith'
```
When I put this to my source folder, it goes to PutDatabaseRecord and gives following error
> None of the fields in the record map to columns defined by the nifi.nifiTest table.
First I used MySQL just with GetFile -> PutDatabaseRecord, it was working properly without error.
What am I missing here? I am pretty new for Nifi.
Created 10-21-2019 05:17 AM
I have fixed this issue with the help of my supervisor. I have used only two processors.
GetFile and PutDatabaseRecord.
Two changes made for `PutDatabaseRecord` Processor
1) Schema name : public
2) Translate field names : false
Also didnt use AVRO reader.
I hope this would help someone.
Created 10-21-2019 05:17 AM
I have fixed this issue with the help of my supervisor. I have used only two processors.
GetFile and PutDatabaseRecord.
Two changes made for `PutDatabaseRecord` Processor
1) Schema name : public
2) Translate field names : false
Also didnt use AVRO reader.
I hope this would help someone.
Created 12-04-2019 02:43 PM
AvroReader is required in PutDatabaseRecord, I have the same issue, how you solve it?
Created 12-04-2019 07:30 PM
Sorry, I havent use AVRO, as my scenario entirely based on csv data. I think posting a new question may give attention from community.