0 ×

DB Query

KNIME database nodes version 4.3.2.v202103021015 by KNIME AG, Zurich, Switzerland

Modifies the SQL query that defines the incoming DB Data table. The incoming SQL query is represented by the place holder #table# and will be replaced during execute thus creating a sub-query. The resulting SQL query defines the new DB Data table at the out-port.


SQL Statement
SQL editor to enter a new database query based on the incoming DB Data represented by the #table# place holder.
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.
Don't remove the #table# place holder which represents the incoming SQL statement.
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 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.
Database Column List
The list contains the columns that are available in the incoming DB Data 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).
To evaluate the SQL query click on the Evaluate button. This will trigger the execution of the query in the database and fetches the top 10 rows of the result.
Please notice that the query that is used to fetch the preview data is altered to only return the top 10 rows for efficiency usually by wrapping it into a LIMIT statement.

Input Ports

DB Data to use in the SQL query.

Output Ports

Modified DB Data.

Best Friends (Incoming)

Best Friends (Outgoing)



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


A zipped version of the software site can be downloaded here.

You don't know what to do with this link? Read our NodePit Product and Node Installation Guide that explains you in detail how to install nodes to your KNIME Analytics Platform.

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. Browse NodePit from within KNIME, install nodes with just one click and share your workflows with NodePit Space.


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.