1 ×

DB Merge

StreamableKNIME database nodes version 4.0.0.v201906231439 by KNIME AG, Zurich, Switzerland

Merges the data rows in the database with the data values from the input tables. All selected column names need to exactly match the column names from the database. The WHERE column values need to match the row to merge; whereas the SET column values are replaced by the input row values. If no matching rows are found, the node performs an insert.
The output table contains two additional columns if Append merge statuses checkbox is checked. The first extra columns is the number of rows affected by the MERGE statement. A number greater than or equal to zero -- indicates that the command was processed successfully and is an update count giving the number of rows in the database that were affected by the command's execution A value of -2 -- indicates that the command was processed successfully but that the number of rows affected is unknown. The second column shows a warning message, if any.

Options

Settings

Table to merge
Click Select a table to select the table to merge in the pop up dialog, or enter a valid Schema and Table name into the input fields.
Batch size
Enter a number greater than 0 for the number of rows updated in one batch job; 1 means one row at a time.
Fail on error
Disable this if you want to continue after an error.
Append merge status columns
Enable this to append two additional (status and warning) columns to the output table.
Select the columns to merge (SET in SQL)
Select the columns which should be merged in the database e.g. if a matching row exists the values of the selected columns are updated otherwise a new row is created and the values of the selected columns are inserted in to the corresponding database columns. The column names in the KNIME input table need to match the column names in corresponding database table. In SQL this is equivalent to the SET columns.
Select identification columns (WHERE in SQL)
Select all columns used to identify the records in the database that should be merged. Only records in the database that match the values from the input table are merged. The column names in the KNIME input table need to match the column names in corresponding database table. In SQL this is equivalent to the WHERE columns.

Type Mapping

Mapping by type
Select an SQL type for the given KNIME data types.

Input Ports

Table with the data rows to be merged into the database.
DB Connection

Output Ports

Input table with additional columns providing the number of affected rows in the database and warnings, if checked in the dialog.
DB Data referencing the selected table.

Best Friends (Incoming)

Best Friends (Outgoing)

Installation

To use this node in KNIME, install KNIME database nodes from the following update site:

KNIME 4.0
Wait a sec! You want to explore and install nodes even faster? We highly recommend our NodePit for KNIME extension for your KNIME Analytics Platform.