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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: dbt-clickhouse-0.19.0.1.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.2

File hashes

Hashes for dbt-clickhouse-0.19.0.1.tar.gz
Algorithm Hash digest
SHA256 b0036b8eda85e9370c69c69f8f87c97955d531f990888a1809584546da8bf848
MD5 acc423903680fe8ff0c78967ec0ad9cb
BLAKE2b-256 4fa25ba2e4b48be2eac0daa0c9ac561e8ef86b6c73bc648916c1883af46dc6f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt_clickhouse-0.19.0.1-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.2

File hashes

Hashes for dbt_clickhouse-0.19.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e95f6adb97c9279082e42587454a1577ebaf1cfefb33f857c1c15802f0bf00ff
MD5 014f3d90190c606513c0d711c403c36f
BLAKE2b-256 58cb6386e672cab7067e6f821ad80fe448c59eb46ee969b6013ec7dfbda13525

See more details on using hashes here.

Supported by

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