ClickHouse and dbt: Managing the Schema Layer
ClickHouse-specific decisions for a dbt project: MergeTree engine and ORDER BY on source tables, why changing ORDER BY rebuilds the table, schema-scope grants for dbt, and dimension data as code.
ClickHouse-specific decisions for a dbt project: MergeTree engine and ORDER BY on source tables, why changing ORDER BY rebuilds the table, schema-scope grants for dbt, and dimension data as code.
Define ClickHouse roles, users, and permissions as code. Atlas plans and applies changes automatically - no more manual GRANT/REVOKE drift.
Manage ClickHouse roles, users, and permissions through versioned migrations. Every security change goes through code review and CI before reaching production.
Manage ClickHouse schemas as code with Atlas. Inspect a live database, plan migrations automatically, and apply them declaratively or as versioned files.
Trace column-level data lineage across tables and views of your ClickHouse database. Visualize how columns are derived, inspect transformation expressions, and map upstream and downstream dependencies.
All common open-source relational database management systems are supported in all versions of Atlas.
Detect when a warehouse stops matching its checked-in schema while dbt keeps rebuilding models: what migrate status misses, how atlas schema diff reports drift, and what excluding dbt's database costs you.
This guide walks you through managing ClickHouse Cloud databases using Atlas, covering connection setup, development database considerations, and best practices for cloud environments.
Define ClickHouse named collections as code. Atlas inspects, plans, and applies CREATE/ALTER/DROP NAMED COLLECTION statements automatically.
Introduction
Define ClickHouse WASM modules and WASM user defined functions as code. Atlas inspects, plans, and applies the SQL to create them automatically.
Managing schema changes in ClickHouse clusters with Atlas requires understanding several key concepts. While Atlas works seamlessly with both single-node and cluster deployments, cluster mode introduces specific considerations that must be addressed to ensure reliable schema management.
Define ClickHouse lookup tables and seed data as code. Atlas computes INSERT, ALTER UPDATE, and ALTER DELETE statements automatically.
Which ALTER statements rewrite data on a large warehouse table, which ones are metadata-only, and how to block a destructive change with Atlas lint and a pre-migration check.
Manage the schema layer a dbt project runs on with Atlas: databases, source tables, lookup data, roles and grants, with dbt's own models left to dbt through exclude patterns in atlas.hcl.
Atlas provides comprehensive support for managing ClickHouse database objects using HCL schema definitions. Below is an overview of the objects you can manage.
While Atlas supports defining engines as simple enums in HCL (like MergeTree or SharedMergeTree), many ClickHouse features require more complex configurations. Atlas provides the sql() function to handle these advanced scenarios.