Return only the saved records from db without any query

Hello,

My requirement is to return the saved records from db which we have inserted through DB writer, which needs to be used in child tables. Is there anyway i can achieve this?

Hey @bj41097,

Welcome to the Community!

If I am understanding your question correctly: You need access to the data that was just saved/inserted into your DB.

The ‘DB Writer’ node should have a output table that provides this inserted information with an additional column that shows whether it was successful or not. You can do a simple filter based off the ‘WriteStatus’ column and only consider the ones that have ‘1’ on it or greater as in your case you are only concerned with rows that were inserted to your DB.

Here is the sample workflow I am using:
image

The table output on ‘DB writer’:

Here is a link with additional information on the node:
https://hub.knime.com/knime/extensions/org.knime.features.database/latest/org.knime.database.node.io.write.DBWriteNodeFactory

Hope this helps,
TL

1 Like