Long time viewer, first time poster.
Hoping the N8N Community Guru’s could help with me an issue updating rows a MariaDB Database.
Information on the CSV File
I have a CSV File that gets updated daily with numerous lines.
There are headers in the CSV file, namely stock_code,manufacturer_code,barcode,description,sell_unit,sell_price,moq,stockonhand,brand,category1,category2,category3
Under each of the headers are products with the respective information in relation to the headers.
The database in Question has a corresponding table with the corresponding headers as the row names.
Background information on what I am wanting to achieve.
Setup a file trigger to monitor a specific folder for file changes - Done & Working.
Take that csv file and update the corresponding table in the database with the information from the CSV File, leaving the headers in place. It is at this stage that I am failing and I have tried all I can think of to get this working, sadly with no success.
Thanks for reaching out. I’ve managed to get the workflow to run, the issue is now the database is not being updated with the information from the csv file. What I mean by this is the insert command in the sql connector runs, but updates the values with NULL. After all my reading I have tried to select the column to be update by using the backtick for MySQL i.e. Product Code but this has not worked.
Can you provide the actual workflow you are using with the node names changed? It is hard to see what you are trying in the nodes from a screenshot. I suspect what is happening is the data coming out of the spreadsheet file node isn’t matching up with the fields in some way.
The first thing I have noticed is the Insert Data is not listing all the columns you want to insert, When added thought it does look like there is an issue when inserting to a field with a space in the name.
I will do some testing on that shortly and get a bug ticket created, For now using the execute query option should get you around this one.
Thanks for the feedback. For now I’ve managed to get around it my using the SET Connector, but I do agree that it appears to be some sort of bug. Now the next thing to figure out is the updating of rows in the db.