CSV data to mysql using node red

How do I insert csv data from an online file to mysql using node red?

Hi.

Is this the same question as your other post? Please dont open multiple threads on the same issue - it just causes confusion.

Which part are you stuck on?

  • getting the file?
  • parsing the file?
  • creating the SQL to perform an insert?

  • Have you watched the Node-RED Essentials playlist to get familiar with node-red?
  • Have you been through the cookbook and tried the examples?

Show us what you have tried so far and tell us which point you are stuck on.

Hi steve, I'm stuck in inserting the csv file into mysql database. I'm able to get the csv file and parse it.

Have you read the help on the node-red-contrib-node-mysql? Look at the bit titled "Preparing Queries"

Yes I've read the documentation, my query is that I do not want hard coded values in msg.payload.
I want to pass the values from my csv file directly to mysql database

Then dont use hard coded values. Use change nodes & function nodes & split nodes to move your data around until it meats the desired format as described on the mysql nodes readme.

TBH, I suspect (from your questions) that you lack certain node-red knowledge as what you are asking is pretty much base node-red functionality.

If you cant figure that out from the info I have provided, then I recommend you go watch the play list i linked to earlier. Seriously, spend 1 hour - its worth it. Also try the cookbook examples out & read the forum posts (there are a few worked examples on CSV to mySQL)

In particular, read/watch this : how to use the debug panel to find the right path to any data item. Working with messages : Node-RED

Yes Steve, I'm very much new to Node Red and I'm not able to figure out how to frame an insert statement for inserting my csv data to mysql database

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.