Frederico Nunes
02/27/2026, 10:42 AMcolumn \"unique_key\" does not exist in dbt_snapshots
I did run the elementary models as suggested with dbt run --select elementary
What's the issue?kapa.ai
02/27/2026, 10:42 AMkapa.ai
02/27/2026, 10:42 AMelementary.dbt_snapshots table doesn’t yet have the new unique_key column that newer Elementary CLI versions expect when running the get_snapshots macro. [unique_key error; version alignment]
From the community threads, this almost always comes down to version/schema mismatch:
1. Make sure CLI and dbt package versions match (same minor):
For example, if you’re on elementary-data==0.22.x, your dbt package in packages.yml should also be elementary-data/elementary: 0.22.x. Mismatched minor versions cause the CLI to look for columns that don’t exist yet. [version mismatch fix]
2. Rebuild Elementary models after aligning versions:
dbt deps
dbt run --select elementary
This command is what actually adds unique_key (and similar new columns) to dbt_snapshots and related tables. [rebuild models; schema update]
3. Verify in the warehouse:
Check elementary.dbt_snapshots directly and confirm that a unique_key column exists. If it doesn’t, the models didn’t update correctly and you may need to re‑run the command (in some cases users had to re‑run after a previous --full-refresh). [missing unique_key; rerun fixed it]
If after aligning versions and re‑running dbt run --select elementary the unique_key column still isn’t there, the knowledge sources don’t provide more specific v0.22 guidance; in that case, sharing your exact packages.yml, elementary-data version, and a DESCRIBE of elementary.dbt_snapshots in the community would be the next step. 👍 0 button 👎 0 button ℹ️ Tip: Mention @elementary.ai in the thread for follow-ups or DM the app for 1-to-1 help.