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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: dbt-clickhouse-0.20.1.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.1 CPython/3.9.6

File hashes

Hashes for dbt-clickhouse-0.20.1.tar.gz
Algorithm Hash digest
SHA256 179692f21d6565eab606cc1e96f8232b8348d59d4d876649f27f83242837fe1e
MD5 d0fa5838dd66cc5c32aa8f54aab56ef8
BLAKE2b-256 3a92057fcae535dfd81cc573bfbc93d9c555d5bcabe0df90e81361d74be29b28

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt_clickhouse-0.20.1-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.1 CPython/3.9.6

File hashes

Hashes for dbt_clickhouse-0.20.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c1149aeb9b45031e374cd2eafa6a60070bca370f240eaa23b6b40a451c0af5bd
MD5 2676930df4c3d2965fa7022be299e82d
BLAKE2b-256 6cc92d81a5eee0671cb06ef0e3372a5d65a6b92bcccf65d7ee487875507215d8

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