← All Adapters
Official dbt ClickHouse adapter docs ↗
CLICKHOUSE
type: clickhouseColumn-oriented OLAP database for real-time analytics. Designed for sub-second queries over billions of rows.
DVT SUPPORT
✓ FEDERATION SOURCE
read in federation models
✓ FEDERATION TARGET
materialize federation results
✓ DEFAULT TARGET
run full dbt projects against it
✓ SEED TARGET
dvt seed --target loads here
DVT supports ClickHousebecause both dbt and Sling do: dbt drives standard materializations when it's your default target, Sling moves data in and out during federation. Connectivity for both layers is checked with dvt debug --all.
PREREQUISITES
Driver: clickhouse-connect — installed automatically by:
dvt sync
CONFIGURATION FIELDS
| FIELD | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|---|---|---|---|---|
| type | string | yes | — | Must be `clickhouse` |
| host | string | yes | localhost | ClickHouse server hostname |
| port | integer | no | 9000 | Native protocol port |
| user | string | no | default | Database username |
| password | string | no | — | Database password |
| database | string | no | default | Database name |
| threads | integer | no | 4 | Number of parallel threads |
PROFILES.YML EXAMPLE
my_project:
target: ch_dev
outputs:
ch_dev:
type: clickhouse
host: localhost
port: 9000
user: default
password: "{{ env_var('CH_PASSWORD') }}"
database: analyticsSOURCES.YML EXAMPLE
sources:
- name: clickhouse_data
meta:
connection: ch_dev
database: analytics
tables:
- name: events
- name: metricsDBT ADAPTER FEATURES
When ClickHouse is your default target, every standard dbt model runs through the official dbt adapter — all of its documented capabilities apply unchanged:
MATERIALIZATIONS
tableviewincrementalephemeraldistributed_table (experimental)f_tablef_incrementalINCREMENTAL STRATEGIES
appenddelete+insertNOTABLE CONFIGS
- ▸MergeTree engines
- ▸order_by
- ▸partition_by
- ▸TTL
- ▸needs BOTH transports: HTTP (clickhouse-connect) + native (clickhouse-driver) — dvt sync installs both
FEDERATION INCREMENTAL STRATEGIES
Strategies available when this engine is the target of a f_incremental model:
✓ Append✓ Delete+Insert✓ Merge