DB Inserts & Updates

Hi I wonder if there is a possibility of looping over each row from a file read and contructing insert/update statements.  I think this would be very useful and surprised I have not come across it yet.  The best case would be to have row loop module which enables you to edit the sql for the insert or update....is this vailable some where or is this work in progress?


These features are not net yet available in KNIME, but planned for 2011.

Regards, Thomas


Is there any news on when the SQL 'update' command might be implemented? I realise that I could pass data to an external program written in e.g. Python to do this, but it'd be far more convenient to have a native node that would provide this functionality.

I would have a go at implementing this myself, but I can't seem to find the source code for the Database Writer node for some example code. Could anyone point me in the right direction?



Update is also important for me. But I don't want to write script by myself. So I am thinking about using SQLite on-conflict clause. For example,

CREATE TABLE "newproduct"  ( "MaterialID" WVARCHAR(255) UNIQUE,"PartNum" WVARCHAR(255),"availabledate" WVARCHAR(255),"Title" WVARCHAR(255), PRIMARY KEY ( "MaterialID" ) ON CONFLICT REPLACE)

Good tip, and if that works for you that's brilliant. Unfortunately this wouldn't work in my case; I'm using MySQL, which doesn't support the ON CONFLICT clause.

Unfortunately, the UPDATE functionality is still not available in KNIME's database writer node. If you want to have a look into the sources of the database integration, please use the KNIME SDK, create a KNIME plug-in using the New Node Extension Wizard and search (Ctrl+Shift+T) for the DatabaseConnectionWriter class and the corresponding node classes.