The Clickhouse plugin for dbt (data build tool)
Project description
dbt-clickhouse
This plugin ports dbt functionality to Clickhouse.
We have not tested extensively against older versions of Clickhouse. The plugin uses syntax that requires version 20.11 or newer.
Installation
Use your favorite Python package manager to install the app from PyPI, e.g.
pip install dbt-clickhouse
Supported features
- Table materialization
- View materialization
- Incremental materialization
- Seeds
- Sources
- Docs generate
- Snapshots (experimental)
- Ephemeral materialization
Usage Notes
Database
The dbt model database.schema.table
is not compatible with Clickhouse because Clickhouse does not support a schema
.
So we use a simple model schema.table
, where schema
is the Clickhouse's database. Please, don't use default
database!
Model Configuration
Option | Description | Required? |
---|---|---|
engine | The table engine (type of table) to use when creating tables | Optional (default: MergeTree() ) |
order_cols | A tuple of column names or arbitrary expressions. This allows you to create a small sparse index that helps find data faster. | Optional (default: tuple() ) |
partition_cols | A partition is a logical combination of records in a table by a specified criterion. The partition key can be any expression from the table columns. | Optional |
Example Profile
your_profile_name:
target: dev
outputs:
dev:
type: clickhouse
schema: [database name]
host: [db.clickhouse.com]
# optional
port: [port] # default 9000
user: [user]
password: [abc123]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dbt-clickhouse-0.19.0.2.tar.gz
.
File metadata
- Download URL: dbt-clickhouse-0.19.0.2.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17921ea907b84492fdccd199216c89de83f7fc1a90d0b6e88fbc01c0af44c726 |
|
MD5 | 1d5bc6d38253d911cf576d5e039c3998 |
|
BLAKE2b-256 | b2a21448e3af9be6e1043e1444a301c3c22b2bbba002d179fbc145092d149ad0 |
File details
Details for the file dbt_clickhouse-0.19.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: dbt_clickhouse-0.19.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5887ba580d30fdf941b98163656bc8d97e2d519dbfa79458e0f092acce4086fc |
|
MD5 | e9d928c938bc0d42af0c8e54096a836c |
|
BLAKE2b-256 | 41a48d2d9f59bb8725e96389d95dd08046b79583a13f8e8d4283546ad491eb7f |