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


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

Uploaded Source

Built Distribution

dbt_clickhouse-0.19.0-py2.py3-none-any.whl (19.0 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: dbt-clickhouse-0.19.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.4

File hashes

Hashes for dbt-clickhouse-0.19.0.tar.gz
Algorithm Hash digest
SHA256 b398e17896954bbf0fc3c0267a235b41ded4e1efc96c3f21acaeb45212541084
MD5 74ccbe34d4c5d322bd0a4cb2a69eeee9
BLAKE2b-256 60c6957553fd69b0cdc738d7d11e9b65a0c2a7386e71f639c27bea4a31f2b58c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt_clickhouse-0.19.0-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.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.4

File hashes

Hashes for dbt_clickhouse-0.19.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2d962cc62a8c5432bcc04a6d3ae5a659729bbaafe93d90e8fa8809ddfec6f5cc
MD5 999aadbd98d5fe7c5bf0772bd2d467a5
BLAKE2b-256 f6fd807ac79f7c41a4901404a3dc7809abb5d44532e4da3bb9c9ddbe1598d890

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