0

I am just now learning KNIME. I have successfuly set up a MySQL connector and connected a database reader to it. Then I did a database writer that basically aggregates data and pushes it to a new table.

My problem comes when I just need to do a simple update statement on my newly generated table.

I basically need to say update table1 set year = 2017 where ID < 2000;

I have looked and tried for hours but I cannot seem to figure out how to just run a simple update statement on a table from KNIME.

Please let me know if you need anymore information and as always thank you so much in advance for the help!

MJCS
  • 139
  • 1
  • 11

1 Answers1

0

You can do the following (though not in a transaction):

  • read the rows and with Row Filter select those with ID < 2000
  • change the year column to 2017 with the Constant Value Column
  • use the Database Update node with SET column year and WHERE columns all others (or just id if that is unique).
Gábor Bakos
  • 8,982
  • 52
  • 35
  • 52