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
- Tests
- 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_by | 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_by | 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]
cluster: [cluster name]
verify: [verify] # default False
secure: [secure] # default False
connect_timeout: [10] # default 10
send_receive_timeout: [300] # default 300
sync_request_timeout: [5] # default 5
compress_block_size: [1048576] # default 1048576
compression: ['lz4'] # default '' (disable)
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-1.0.1.tar.gz
.
File metadata
- Download URL: dbt-clickhouse-1.0.1.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9f3ed28f6f531542627917f0d2a9fc0344c5deb0f0a7653b03d381eab095e52 |
|
MD5 | e4311b4a328dc16381266fe78879cc1a |
|
BLAKE2b-256 | 9cb644f979d9b6c1f6115044bbd8529e84e8e49e60f9a3e6440f67c7c5b74e9b |
File details
Details for the file dbt_clickhouse-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: dbt_clickhouse-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 946889040cd896d35aedc57525c69158369b63d82af031378cfa5578509ade86 |
|
MD5 | 98e98a91a26728770482495bda82cfda |
|
BLAKE2b-256 | 22cfc477f3a28a43013504f6f47316b8785c6493b887bb7b6dc259101f83b0c4 |