Skip to content
KNIME Documentation
Main Navigation Get startedBuildWork with KnimeAccount and adminRelease notesDeveloper tools
Community Hub
DevelopersKnime
Sidebar Navigation

Getting Started

Installation

User Guide

Release Notes

Install Extensions

Building Workflows

Components

Flow Control

Expressions

File Handling

Deployment

Integrated Deployment

Workflow Invocation

Best Practices

Advanced Features

AI Extension

Get Started

Build an Agent

Inject context with RAG

LLM Providers

Tutorials

Summarize product reviews

Product FAQ assistant

Restaurant agent

Your first local agent

Task extractor

Reporting

Kerberos

Extensions

Database

Overview

Tutorials

Read and filter data from a database

Write a transformed dataset to a database

Concepts

Ports and Sessions

Query Generation

Type Mapping

Deprecated Framework

Connecting

Connect: Dedicated Node

Connect: File-Based Database

Connect: Generic DB Connector

Register a JDBC Driver

Install Third-Party Driver Plug-in

Drivers on Hub and Server

Kerberos Constrained Delegation

Reading and Transforming

Read Data

Transform Data Visually

Run a Custom SQL Query

Parameterize a Query

Writing and Modifying

Insert, Update, or Merge

Delete Rows

Bulk Load Data

Create and Remove Tables

Use Transactions

Reference

Connector Node Settings

JDBC Driver Reference

Deprecated Node Mapping

Migrate Deprecated Workflows

Python

Overview

Tutorials

Python Scripting Quickstart

Data App Development Using Plotly

Data Processing

K-AI Scripting Assistant

Data Type Conversion

Batch Processing

Jupyter Integration

Environment Management

Pixi Configuration

Dependency Management

Environment Persistence

Channel Mirrors & Air-Gapped Setups

Conda Migration

Alternative Configurations

Conda and Miniforge Setup

Conda Environment Propagation

Manual Python Configuration

Legacy Node Migration

Concepts

Pixi Backend Architecture

Storage Logic

Python Environments on Executors

Reference

Python Scripting API

Bundled Packages

Executor and Hub Configuration

Troubleshooting Guide

API Reference

Inputs and outputs

Classes

Views

Utility functions

R

Deep Learning

Snowflake

Google Cloud

Azure

AWS

Big Data

Big Data Admin

Big Data Secured Cluster

Databricks

Microsoft Fabric

Power BI

Tableau

Report Designer

H2O

Changelogs

Version 5.12

Version 5.11

Version 5.10

Version 5.9

Version 5.8

Version 5.7

Version 5.6

Version 5.5

Version 5.3

Extensions

Read and filter data from a database ​

This tutorial shows how to connect to a database, select a table, filter its rows in-database, and read the result into KNIME Analytics Platform.

What you need ​

  • KNIME Analytics Platform. All database nodes are included in every installation, so no additional extension is required.
  • A JDBC-compliant database (this tutorial uses H2)
  • Database credentials (username and password), if required by your database

Steps ​

1. Connect to the database ​

Add an H2 Connector node to your workflow. Click the node once to open its configuration, select the database dialect and driver, and specify the location of the database file. To create a temporary database stored in memory, choose In-memory if the database supports it. Execute the node to open the connection.

2. Select a table ​

Connect a DB Table Selector node to the Connector node. Click the node once to open its configuration, then click Browse to choose a table or view from the database.

To write your own SQL query instead, enable the Custom Query checkbox. Any SELECT statement is accepted. The placeholder #table# refers to the table selected via the browser.

3. Filter rows in the database ​

Connect a DB Row Filter node to the DB Table Selector. Click the node once to open its configuration, then add your filter conditions. No data leaves the database at this stage — the node builds a SQL WHERE clause from the conditions you define.

4. Read the result ​

Connect a DB Reader node to the DB Row Filter. Execute the node. It runs the input SQL query in the database and loads the data into KNIME as a KNIME data table.

An example workflow is available on KNIME Hub.

Pager
Previous pageOverview
Next pageWrite a transformed dataset to a database