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


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.21.1.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

dbt_clickhouse-0.21.1-py2.py3-none-any.whl (22.1 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: dbt-clickhouse-0.21.1.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dbt-clickhouse-0.21.1.tar.gz
Algorithm Hash digest
SHA256 d2e92e21213818dcba3aa26e8e4c9794eff8245cc164679536fba74c5341e256
MD5 93e2d53bf33069926e95a93b023ae358
BLAKE2b-256 d946e9d05912728734216a62bd3cca6e1bdbeedbf12a5d10d983796f631caf3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt_clickhouse-0.21.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.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dbt_clickhouse-0.21.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4eae3763a577e30bffb98f5a5de8100e88e89699958003ca9914137f1cce4342
MD5 b01245e08f6c2d6de0553c277fc60c9c
BLAKE2b-256 7ecb4009326eee78f761c937c54c887141cf86fe4313fc59ee68497cb234ceba

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