I'm using Elementary with Clickhouse. I have run `...
# ask-elementary-ai
j
I'm using Elementary with Clickhouse. I have run
dbt build
a few times. The tests section in the report works but the Model Performance tab shows
No model runs
My table
dbt_run_results
is populated and
dbt_models
too but
model_run_results
is empty in clickhouse?
k
A message from kapa.ai
Based on the knowledge sources, the issue you're experiencing—where
dbt_run_results
and
dbt_models
are populated but
model_run_results
is empty—typically points to a problem with how the
model_run_results
view is created or materialized. Key points to check: 1.
model_run_results
is a View, Not a Table:
The
model_run_results
is supposed to be a view that joins
dbt_run_results
and
dbt_models
. If it was accidentally materialized as a table (or not created at all), it will not update as expected. This can happen if there is a global or project-level materialization config in your
dbt_project.yml
that overrides Elementary's default materializations. For example, having
+materialized: table
globally can break this view and cause it to be empty or stale. [See discussion here](https://slack.com/archives/C02CTC89LAX/p1693825818714329). 2. Materialization Conflicts: Users have reported that setting
materialized: table
for Elementary models in
dbt_project.yml
can break the expected behavior. The solution is to scope any global materialization configs to your own project or subproject, and not to the Elementary models. [See example here](https://slack.com/archives/C02CTC89LAX/p1723832490968039). 3. Schema Consistency: Ensure that
dbt_run_results
,
dbt_models
, and
model_run_results
are all in the same schema/database, as the view depends on joining these tables. [See troubleshooting here](https://slack.com/archives/C02CTC89LAX/p1693825818714329). 4. View Definition: If you suspect the view was created incorrectly (e.g., as a table or with an error), try dropping and recreating it. You can do this by running:
Copy code
dbt run --select elementary --full-refresh
This will rebuild the Elementary models and views as intended. Summary of what to do: - Check your
dbt_project.yml
for any global
materialized: table
or similar configs and ensure they do not apply to Elementary models. - Make sure
model_run_results
is a view, not a table. - Rebuild the Elementary models with a full refresh. - Confirm all relevant tables/views are in the same schema. If after these steps
model_run_results
is still empty, there may be a Clickhouse-specific compatibility issue, but the knowledge sources do not provide explicit information about Clickhouse-specific problems. Let me know if you need help checking your configs or view definitions!
j
It was the default
+materialized: table
😓