Support Questions

Find answers, ask questions, and share your expertise

What is the best way to load a csv file into DB using NiFi?

New Contributor

I have a requirement to process a csv file into Teradata. I came up with a design but I would like to know if there is a better way to do this.

My design : SplitText --> ExtractText-->ReplaceText-->PutSQL

I do not think this approach is efficient if we have a lot of records in a csv file. I am looking for a design that can do batch inserts into the DB. Thanks.



Hi @Abhilash Dasari

The PutDatabaseRecord processor using a CSV Record Reader looks to be a possible solution:

New Contributor

@Andrew Lim: Thank you for your response. Looks like the PutDatabaseRecord processor needs a lot of configuration to be done. I will try it out and update the thread on the outcome.


No problem @Abhilash Dasari, hope you are successful in getting PutDatabaseRecord working.

Some PutDatabaseRecord examples in HCC (MySQL database not Teradata):

Lastly, the UI in HCC isn't helpful in promoting this, but to keep these question/answer threads cleaner, it is a good practice to select "Add comment" instead of creating a new "Answer" when replying. Thanks!