Delete rows from a database table
Use DB Reference Row Deleter to delete rows that match values in a KNIME input table, or DB Row Deleter to delete rows that match filter conditions you define in the node configuration.
Before you begin
- Establish a database connection. See Connect to a database using a dedicated connector node.
- For DB Reference Row Deleter: prepare a KNIME data table whose column values identify the rows to delete. Column names must match the target database table exactly.
Delete rows matching a KNIME table with DB Reference Row Deleter
The DB Reference Row Deleter node deletes rows from a database table using values from a KNIME reference table.
- Connect the DB Connection output port to a DB Reference Row Deleter node, and connect the KNIME data table with the identifying values to the second input port.
- Click the node once to open its configuration.
- Under Database Table, enter the Schema name and Table name, or click Browse to select the target table.
- Under If a database error occurs, choose Fail or Ignore.
- Set Batch size to the number of rows to send per database statement.
- Under Changing, select the Columns for row identification (WHERE in SQL) — the columns whose values are compared against the database table to find rows to delete. Column names must match those in the database.
- Under Output, tick Append status column or Append error column to add the corresponding column to the KNIME output table, and set their column names.
- Click Show advanced settings to configure Disable DB Data output port or Output Type Mapping.
- Click Apply to save the configuration, or Apply and Execute to save it and run the node.
Delete rows matching filter conditions with DB Row Deleter
The DB Row Deleter node deletes rows from a database table that match filter conditions you define, or every row in the table.
- Connect the DB Connection or DB Data output port to a DB Row Deleter node.
- Click the node once to open its configuration.
- Under Database Table, enter the Schema name and Table name, or click Browse to select the target table.
- Under Delete, set Mode to Matching rows to delete only rows that match a filter, or All rows to delete every row in the table.
- If Mode is set to Matching rows, click + Add filter criterion to define the columns, operators, and values that identify rows to delete. These conditions generate the
WHEREclause of theDELETEstatement. - Under Output, tick Append status column or Append error column to add the corresponding column to the KNIME output table, and set their column names.
- Click Apply to save the configuration, or Apply and Execute to save it and run the node.
An example workflow is available on KNIME Hub.