Skip to main content

The Clickhouse plugin for dbt (data build tool)

Project description

dbt logo

build

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_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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt-clickhouse-0.19.1.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

dbt_clickhouse-0.19.1.1-py2.py3-none-any.whl (19.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dbt-clickhouse-0.19.1.1.tar.gz.

File metadata

  • Download URL: dbt-clickhouse-0.19.1.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for dbt-clickhouse-0.19.1.1.tar.gz
Algorithm Hash digest
SHA256 e97d9667818a61fd69cefc150a663322c8c8912d94dafecf7f424dba76346af0
MD5 c3abb0cca9fa7eb975024418617bb46f
BLAKE2b-256 aab9844d07a6ec1b4cbbcbf095653f9465541783a79a8b938fd46fc9978af5db

See more details on using hashes here.

File details

Details for the file dbt_clickhouse-0.19.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: dbt_clickhouse-0.19.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6

File hashes

Hashes for dbt_clickhouse-0.19.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4080af7b7b21a9e6d47018aad5235d7eef045bd05de591fc8c06e2d71aa0c4a5
MD5 d64b0a45ee104ff52448b32b834253d9
BLAKE2b-256 1e3391ce2607e9158f531469dcee2b93e24101feb5b54bc092eede04a1efd18f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page