dbt alternatives for ClickHouse: what's honestly worth trying

The dbt-ClickHouse adapter has real gaps. SQLMesh, dataform, custom compilers, and the semantic-layer-first approach - a field guide.

dbt is the default transformation tool for a reason. It is the most-widely-used, best-supported, and best-documented option for compiling SQL models against a warehouse in 2026. Most teams should start there.

If you are running ClickHouse specifically, the dbt story has real friction. The dbt-clickhouse adapter is community-maintained (well, ClickHouse-maintained, which is closer to first-party than most adapters), but it lags dbt-core on features, and ClickHouse’s engine model - MergeTree, materialized views, projections, dictionaries - does not map cleanly to dbt’s table / view / incremental / snapshot shape.

This post walks through the alternatives worth trying when the dbt-ClickHouse friction outweighs the dbt-ecosystem benefit.

Where dbt on ClickHouse breaks down

Three friction points, in order of severity:

1. ReplacingMergeTree semantics leak into user SQL. dbt’s incremental strategy assumes MERGE-style upserts. ClickHouse’s ReplacingMergeTree collapses duplicates lazily during merges, so a naive SELECT after an incremental run can return duplicate rows. The workaround is FINAL at read time or argMax tricks in the model SQL. It works, but the user has to think about it, which is exactly what dbt’s abstraction was supposed to hide.

2. Materialized views and projections are not first-class model types. dbt has table, view, incremental, snapshot, and materialized. It does not have a projection or a materialized_view_with_source model type. The dbt-clickhouse adapter has added materialized_view support (docs here), but the DAG semantics are still under active iteration and running MVs alongside dbt-managed tables sometimes requires model post-hooks.

3. Dialect drift in tests. dbt tests are portable SQL, and they compile on ClickHouse. But unique and not_null on a ReplacingMergeTree mean something different than on a MergeTree because of the collapse semantics. Test failures that pass on Postgres and fail on ClickHouse (or the reverse) are common enough to matter.

None of this makes dbt a bad choice on ClickHouse. It makes dbt-on-ClickHouse an option with sharper edges than dbt-on-Snowflake.

SQLMesh

SQLMesh is the most dbt-shaped alternative. It targets the same job (compile SQL models into a warehouse) with a stricter definition of what a model is: every model has a virtual environment, every change is a plan-and-apply, and column-level lineage is built in.

Fits when: you like dbt’s model but want stronger primitives around forward-only migrations, column-level lineage, and virtual environments for testing model changes without physicalising them. SQLMesh’s ClickHouse support is reasonable (with the same MergeTree engine-family caveats), and the plan-and-apply story is genuinely nicer than dbt’s manual run-and-recover.

Does not fit when: you have a large existing dbt investment and the migration cost is not worth the plan-and-apply upgrade. Most teams on dbt should not switch to SQLMesh; teams starting fresh have a real reason to evaluate it.

dataform

dataform is Google’s transformation tool. It is dbt-shaped, tightly integrated with BigQuery, and free as part of Google Cloud.

For ClickHouse, dataform is not the answer. Its ClickHouse story is minimal and non-first-party. Include it here only to be honest about the field.

Fits when: you are on BigQuery and want an integrated Google-native option.

Does not fit when: you are on ClickHouse. Skip it.

Custom compilers on sqlglot

If your transformation shape is unusual - highly ClickHouse-specific, or built around materialized views and projections as primary primitives - a homegrown compiler on top of sqlglot is a realistic option. It is a few hundred lines of Python plus a Jinja renderer plus a runner. See our post on how to build a semantic layer in ClickHouse for what the shape looks like.

Fits when: your team has a Python engineer who understands SQL parsing, your transformation logic is not a standard star schema, and dbt’s abstractions fight you more than they help.

Does not fit when: you have three data engineers and no time to maintain a compiler. The dbt community and ecosystem are worth a lot; walking away from them for bespoke tooling is a real cost.

Semantic-layer-first tools

The category shift worth naming: the transformation tool and the semantic layer are collapsing into the same product. If your goal is to define metrics once and have every dashboard, ad-hoc query, and AI Q&A compile from the same definition, the pure transformation tool is only half the story.

Cube (cube.dev) is a semantic layer with a compiler that treats the semantic definitions as canon. It targets ClickHouse well. If you want the semantic-layer-first shape, Cube is the most mature option.

dbt Semantic Layer (docs) sits on top of dbt models. The metric definitions live in the dbt project, the compiler is MetricFlow, and the query surface is JDBC and GraphQL. If you already have a dbt investment, this is the natural next step.

Goni (our product) is a semantic-layer-first BI tool on ClickHouse. The semantic layer is compiled from YAML into ClickHouse SQL, and the BI, saved queries, and AI Q&A surfaces all route through the compiler. This is the option that treats the semantic layer as the primary artifact and the transformation layer as an implementation detail. It fits ClickHouse-first teams who do not want a dbt-plus-BI-plus-AI stack of three separate tools.

Comparison

ToolPrimary jobClickHouse fitSemantic-layer-firstMigration from dbt
dbt (+dbt-clickhouse)TransformationAdequateVia dbt SLN/A
SQLMeshTransformation with plan/applyGoodNoReal work
dataformTransformation (BQ)PoorNoN/A
sqlglot-based customTransformationFull controlIf you build itReal work
CubeSemantic layerGoodYesRuns alongside dbt
dbt Semantic LayerSemantic layerAdequateYesAdditive
GoniBI + semantic layerClickHouse-firstYesRuns alongside dbt

Which honestly fits which team

Team on dbt, mostly happy, hitting ClickHouse-specific friction. Stay on dbt. Fix the specific friction (add materialized_view support post-hooks, add ClickHouse-specific tests, upgrade the adapter). The switching cost is not worth it.

Team on ClickHouse, no existing dbt investment, greenfield. SQLMesh or a semantic-layer-first tool (Cube or Goni). Do not start on dbt-clickhouse just because dbt is the default; the sharp edges are real.

Team on dbt, wants a semantic layer, has strong dbt DAG. dbt Semantic Layer or Cube alongside dbt. Both are additive - they consume dbt’s metadata and add the layer on top.

Team on ClickHouse-first BI stack, wants one tool that does semantic + BI + AI Q&A. Goni. This is what we ship. See goni.paysera.com.

The dbt investment is worth respecting

If you already have 200 dbt models and a running project, do not throw it out to chase an alternative. dbt-clickhouse’s edges are workable, the community and ecosystem are worth real money, and the migration cost to any alternative is 3 to 6 months of work you could spend on almost anything else. The teams that migrate off dbt successfully do so because they hit a specific ceiling (semantic layer, plan-and-apply, or ClickHouse-native primitives) that they cannot code around.

Why this matters for a data team

dbt is the right default. If you are on ClickHouse, know the specific edges before you commit. If you already committed and the edges are biting, the honest options are (a) invest in the ClickHouse-specific patches on top of dbt, or (b) evaluate SQLMesh or a semantic-layer-first tool that treats ClickHouse’s engine model as first-class. Either path works; picking one and staying on it beats hopping between two.