Database writer/ Unique row ID's

Hi to all,

I am experimenting with knime to calculate some predicted values for molecules and then inserting the results in a database. I am using an Oracle database. Each table needs a unique Row ID for each row.

Has anybody come round the problem of inserting rows - with consecutive/unique RowID's - to an existing Oracle table. I do not how to build a RowID column for my data that is consecutive to the existing RowID's in my Oracle tables.

I was wondering if there was a straightforward way of doing this.

Thanks a lot,


Hi Alejandro,

The Database Writer in KNIME has two modes. (1) You can create a new table to which all the input data is added, or (2) you can append the input data to an existing table containing at least all column as the input data.

In your case, I would suggest to read all the data from the database, calculate predicted values which are appended to each row, and then write the entire table back into the database. Either you can override the "old" table or write everything into a new table which is probably the better way, if want to keep the original data.

The current database implementation does not take care about KNIME's RowIDs neither you have a way to set primary and/or secondary keys. But we will change this in the near future to support also UPDATE and INSERT operations in KNIME.



  I'm a new user and I 'm looking for creating a new table in my DB, with its pk, fks, indexes, ...

Is it already possible?



Yes, with the Database Writer node you can write data from KNIME into a databases.

Thaks Gabriel,

  but how can I define a Primary Key, Foreign Keys, indexes, etc.?

This is not implemented (yet), but can easily be added to the current writer node. I have an open feature request assigned to this enhancement. Thanks.

Has this been implemented yet?

Hi @alextoussant -

Check out the new DB Table Creator node.

1 Like

Awesome, this should work