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.20.0.tar.gz (17.4 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.20.0-py2.py3-none-any.whl (19.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: dbt-clickhouse-0.20.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 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.20.0.tar.gz
Algorithm Hash digest
SHA256 4441ff8372a59d53dfc49925f6b80abd93bfbef7ab0d038e314b5789696a8155
MD5 9b9ea586dc029a2cb37f0aae4c5c6f73
BLAKE2b-256 c2599224bf4f8248c81821d26681d35db768c9456591248a2391f98b730dea92

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt_clickhouse-0.20.0-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.4 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.20.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4af49d288730223d3239f6c57d335d075ba7ded2789fba1b3eb4bea116daf786
MD5 5e12be77172e43678a45f2acd494be2c
BLAKE2b-256 9c80aa5997f9b7c03f127c3a4cf9305276c5f34228961409e14a858c1fc3e685

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