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

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

Uploaded Source

Built Distribution

dbt_clickhouse-0.21.0-py2.py3-none-any.whl (21.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: dbt-clickhouse-0.21.0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 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.0.tar.gz
Algorithm Hash digest
SHA256 c28ea5d1be349dcf41fffefa43db5c0f109b66df174b3b9fdb7d01e9cc3a9d0f
MD5 46be091faa7d1626c1ea8bdeed6f0e53
BLAKE2b-256 67870a0ed31b1fd1971c67b6d6279d5d79abbd57e4679638ac07a24993e51911

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt_clickhouse-0.21.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 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.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 014987514baf2227b475006825922062bfae1133b125d5a3aecbf3120af4f8f4
MD5 b9cfc9d0dc5e59e8ca30d845093d4f53
BLAKE2b-256 4c1f00798e490055d07ee2530d766c8c75a4fe973f16235ed952afae32f6e161

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