skillfed

airflow-clickhouse-plugin

airflow-clickhouse-plugin — Airflow plugin to execute ClickHouse commands and queries

airflow-clickhouse-plugin v1.8.0 666.8K downloads/30d#5,424 on PyPI184
Permissive license MIT License Active released

What it is and what it does

This is an Apache Airflow plugin that wraps clickhouse-driver to let you define ClickHouse queries as Airflow tasks. It offers two operator families: one based directly on clickhouse-driver's Client.execute (ClickHouseOperator, ClickHouseHook, ClickHouseSensor) for full native protocol support, and a second family (ClickHouseSQLExecuteQueryOperator and related operators) that implements the Python DB API 2.0 standard for compatibility with other SQL providers in Airflow.

The native-protocol operators support SQL templating, multiple queries per task, query logging, and custom connection parameters like compression and timeouts. The DB API 2.0 operators provide a standardized interface useful when migrating Airflow pipelines from other databases to ClickHouse. Both families are tested across multiple Python and Airflow versions. The plugin requires Airflow >=2.3.0 and Python >=3.10 for version 1.8.0.

Use it for:

  • Define ClickHouse data transformations and loads as Airflow DAG tasks with SQL templating and XCom result passing.
  • Migrate existing Airflow pipelines from MySQL, Postgres, or BigQuery to ClickHouse using DB API 2.0 operators.
  • Monitor ClickHouse query results or table state changes using ClickHouseSensor or ClickHouseSqlSensor in task dependencies.
  • Execute multi-statement ClickHouse scripts within a single task, with the final query result automatically pushed to XCom.
  • Integrate ClickHouse operations with OpenLineage for data lineage tracking in Airflow 2.7.0+.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Apache Airflow operators and hooks to execute SQL queries and commands against ClickHouse using the native ClickHouse TCP protocol via clickhouse-driver.

Yes. The plugin is actively maintained, has no known vulnerabilities, low install friction, and permissive licensing. It fills a clear need for ClickHouse integration in Airflow with two well-documented operator families. Install it if you run Airflow >=2.3.0 with Python >=3.10 and need to query or load ClickHouse from DAGs.

Install

airflow-clickhouse-plugin on PyPI

pip

pip install airflow-clickhouse-plugin

uv

uv add airflow-clickhouse-plugin

poetry

poetry add airflow-clickhouse-plugin

Installing airflow-clickhouse-plugin

Before you install

Low install friction; pure Python wheel with only two runtime dependencies (apache-airflow and clickhouse-driver). Active maintenance with a release 32 days ago and 184 repository stars.

License in practice

MIT License permits commercial and private use with minimal restrictions; no copyleft obligations or patent clauses.

Quickstart

pip install airflow-clickhouse-plugin

from airflow_clickhouse_plugin.operators.clickhouse import ClickHouseOperator

task = ClickHouseOperator(
    task_id='query_clickhouse',
    sql='SELECT count() FROM my_table',
    clickhouse_conn_id='clickhouse_default'
)

Requires an Airflow connection named 'clickhouse_default' (or custom conn_id) configured with ClickHouse host, port, user, and password; Airflow >=2.3.0 and Python >=3.10 for version 1.8.0.

Verify before relying

  • Whether the plugin's OpenLineage integration (via optional openlineage extra) is production-ready and actively maintained.
  • Performance characteristics when executing very large result sets or high-frequency query patterns.
  • Compatibility with Airflow 3.4.0+ given the version table shows support only up to <3.4.0.

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — apache-airflow, clickhouse-driver
Maintenance actively maintained — 32 days since the last release
Last repo commit
First released
Downloads 666,777/month — #5,424 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: airflow_clickhouse_plugin-1.8.0-py3-none-any.whl

Keywords: clickhouse, airflow

Development Status :: 5 - Production/StableEnvironment :: PluginsIntended Audience :: DevelopersProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

airflow clickhouse operatorclickhouse airflow pluginairflow ClickHouse integrationexecute clickhouse queries airflowclickhouse-driver airflowairflow database operator clickhouseClickHouse DAG tasks
airflow-pluginclickhouse-integrationdata-pipeline

More Database packages

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

redis

Python client library for connecting to and…

permissive · top 1,000 on PyPI

ydb

YDB Python SDK is the official client library…

permissive · top 1,000 on PyPI

snowflake-connector-python

Connects Python applications to Snowflake data…

permissive · top 1,000 on PyPI

sqlparse

sqlparse tokenizes SQL text into a tree of…

permissive · top 1,000 on PyPI

dbt-adapters

Provides base adapter protocols and shared…

permissive · top 1,000 on PyPI

apache-airflow-providers-common-sql

Provides common SQL operators, hooks, and…

permissive · top 1,000 on PyPI

apache-airflow-providers-microsoft-mssql

Integrates Microsoft SQL Server (MSSQL) with…

permissive · top 5,000 on PyPI

apache-airflow-providers-mysql

Integrates Apache Airflow with MySQL databases,…

permissive · top 5,000 on PyPI

apache-airflow-providers-odbc

Provides ODBC database connectivity operators…

permissive · top 5,000 on PyPI

apache-airflow-providers-oracle

Integrates Apache Airflow with Oracle…

permissive · top 5,000 on PyPI

clickhouse-driver

A native TCP driver for ClickHouse that…

permissive · top 5,000 on PyPI

apache-airflow-providers-apache-drill

Provides Apache Airflow integration for Apache…

permissive · top 15,000 on PyPI

apache-airflow-providers-databricks

Integrates Apache Airflow with Databricks,…

permissive · top 1,000 on PyPI

apache-airflow-providers-informatica

Provides Apache Airflow integration operators…

permissive · top 15,000 on PyPI

aiochclient

An async HTTP client for ClickHouse that…

permissive · top 15,000 on PyPI