Support Questions

Find answers, ask questions, and share your expertise
Announcements
We’ve updated our product names and community labels - click here for full details

PutDatabaseRecord :Record does not have a value for the Required column 'name'

avatar
Explorer

I am new to Nifi and trying to load csv data in postgres but I am getting error:

FlowFile[filename=test_data.csv]. Routing to failure.: java.lang.IllegalArgumentException: Record does not have a value for the Required column 'name'

so I have checked everything and the csv file I am uploading contains the data.

I have also checked solutions for issues like this but nothing worked out. I will attach liks to the screenshots it contains the configuration for PutDatabaseRecord and the query for the table I created in postgre and screenshot of the csv file. 

https://drive.google.com/file/d/1TCJTcNJHRslG4wEct1eZmuYz54Gp9e9o/view?usp=drive_link

https://drive.google.com/file/d/1Ye6pggRN4YTQVGxylNarjZh4dlX-ByQ1/view?usp=drive_link

https://drive.google.com/file/d/17zLRe88DSssU9DI3rrJLCHQmUgAj9FYX/view?usp=drive_link

https://drive.google.com/file/d/1XKt1jbZks8jE0kO4CrT3nmRR4LFcIn1e/view?usp=drive_link

 

Note: please let me know how I can upload image here directly

1 ACCEPTED SOLUTION

avatar
Explorer

@MattWho  

I have found the solution for that. The error was because of the semicolon in the CSV file. I have changed it to comma ","because in my configrations the seprator value was comma not semicolon

before:

name;age;email
john doe;56;u@gmail.com
hamed;25;fff@gmail.com
arjun;55;ru@gmail.com
ali;21;ffuty@gmail.com
saleh;16;djh@gmail.com

After:

name,age,email
john doe,56,u@gmail.com
hamed,25,fff@gmail.com
arjun,55,ru@gmail.com
ali,21,ffuty@gmail.com
saleh,16,djh@gmail.com

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Runa27 

You should be able to take a screenshot and then just right click an paste it to the response window.  It may paste small, so click on it and drag the corner to make it large enough that it can be read.  Once you click reply, readers of your post will not have option to resize themselves.

Thanks,
Matt

avatar
Master Mentor

@Runa27 

Without details of your database table structure/configuration and your test file, it would be challenging to identify your exact issue.

Have you tried setting the "Unmatched Column Behavior" property to "Ignore Unmatched Columns" or "Warn on Unmatched Columns" to see if that makes a difference?

MattWho_0-1769034967067.png

Can you share how your CSVReader has been configured?

Please help our community grow. If you found
 any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

 

 
 

avatar
Explorer

@MattWho 

This is the entire flow 

Runa27_2-1769271929461.png

 

this is the data I am trying to insert

Runa27_1-1769271862745.png

 

"Have you tried setting the "Unmatched Column Behavior" property to "Ignore Unmatched Columns" or "Warn on Unmatched Columns" to see if that makes a difference?" Yes I tried that but it fails

The CSV reader configurations:

Runa27_3-1769272130840.png

Runa27_4-1769272196086.png

Please let me know if you need any other information to help me solve this I am trying to solve this from the past 4 days

avatar
Explorer

@MattWho  

I have found the solution for that. The error was because of the semicolon in the CSV file. I have changed it to comma ","because in my configrations the seprator value was comma not semicolon

before:

name;age;email
john doe;56;u@gmail.com
hamed;25;fff@gmail.com
arjun;55;ru@gmail.com
ali;21;ffuty@gmail.com
saleh;16;djh@gmail.com

After:

name,age,email
john doe,56,u@gmail.com
hamed,25,fff@gmail.com
arjun,55,ru@gmail.com
ali,21,ffuty@gmail.com
saleh,16,djh@gmail.com