NiFi: How to enter CSV file content and meta data into single table of postgresql database by NiFi
Hi,
I have csv files and I want to move the content of files along with its meta data (File name, source (To be hard coded), control number (Part of file name - to be extracted from file name itself) thru NiFi. So here is the sample File name and layout -
File name - 12345_user_data.csv (control_number_user_data.csv)
source - Newyork
CSV File Content/columns -
Fields - abc1, abc2, abc3, abc4
values - 1,2,3,4
Postgres Database table layout
Table name - User_Education
fields name -
control_number, file_name, source, abc1, abc2, abc3, abc4
Values -
12345, 12345_user_data.csv, Newyork, 1,2,3,4
I am planning to use below processors -
ListFile
FetchFile
UpdateAttributes
PutDatabaseRecords
LogAttributes
But I am not sure how to combine the actual content with the meta data to load into one single table. Please help

