Skip to main content

The Clickhouse plugin for dbt (data build tool)

Project description

clickhouse 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
      connect_timeout: [10] # default 10
      send_receive_timeout: [300] # default 300
      sync_request_timeout: [5] # default 5
      compress_block_size: [1048576] # default 1048576
      compression: ['lz4'] # default '' (disable)

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

Uploaded Source

Built Distribution

dbt_clickhouse-1.0.4-py2.py3-none-any.whl (22.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: dbt-clickhouse-1.0.4.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for dbt-clickhouse-1.0.4.tar.gz
Algorithm Hash digest
SHA256 fa58d76236a52f11a49179088a0375bec09b336da80e21437736637cf2d2370e
MD5 ccdfb147cdb0bab2ec23947329b29848
BLAKE2b-256 5bf1e767b02cb0d7b71c9c40a4a622131049870e0103df32a7800184fd8c25d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dbt_clickhouse-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4913f296967bee866f3eb690296fafbf2a5c9ae0690dae880739b2f11a5f7dee
MD5 0e08d84dc4697230047829a6384dd230
BLAKE2b-256 663e76dc0fb4d1b4fddbe809ff792eb9b1511eb25b74b4737f48b745c7b008e4

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