DB Row Manipulator

This node runs SQL commands e.g. INSERT, UPDATE, DELETE in the connected database using the values given by the KNIME input table. The values of the selected columns are used in the command resulting in each row of the KNIME input table creating its own command that is send to the database with the corresponding values for execution.

Options

Settings

SQL Statement
Enter the SQL Statement here, for example INSERT INTO table (col1) VALUES (1). Constant values and any identifier from the KNIME column and flow variable list can be used in the SQL statement by double clicking the column or variable name.
To open code completion press <CTRL> + <SPACE>. Table and columns names are only suggested if the metadata is available e.g. shown in the Database Metadata Browser. To perform undo press <CTRL> + Z and for re-do <CTRL> + Y.
Database Metadata Browser
The Database Metadata Browser allows you to browse the database metadata and to select a table or view. Click the Refresh button at the bottom right to re-fetch the metadata from the database. The data is grouped by database schema and type e.g. view or table. By clicking on an entity it shows contained elements. If you click on a table or view the dialog will fetch the column names and types of the selected element. To select a table or view select the name and click OK or double click the element. To search for a particular table or view enter the name or parts of the name into the search field and click on the Magnifying Glass button or press enter.
Column List
The list contains the columns that are available in the KNIME input table. Double clicking any of the entries will insert the respective identifier at the current cursor position (replacing the selection, if any).
Flow Variable List
The list contains the flow variables that are currently available at the node input. Double clicking any of the entries will insert the respective identifier at the current cursor position (replacing the selection, if any).
Batch size
Enter a number greater than 0 for the number of rows used in one batch job. Entering 1 disables batch processing. This way only one row is processed at a time.
Fail on error
Disable this if you want to continue after a database error.
Append manipulation status columns
Enable this to append two additional (status and error) columns to the output table (see description).

Output Type Mapping

This tab allows you to define rules to map from KNIME types to database types.

Mapping by Name
Columns that match the given name (or regular expression) and KNIME type will be mapped to the specified database type.
Mapping by Type
Columns that match the given KNIME type will be mapped to the specified database type.

Input Ports

Icon
KNIME data table with the data rows to be used during statement execution.
Icon
DB Connection to the database.

Output Ports

Icon
Input KNIME data table with additional columns providing the number of affected rows in the database and warnings, if checked in the dialog.
Icon
DB Connection to the database.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.