Diagnose why a dbt model is failing and propose a fix
Wann einsetzen: A scheduled dbt run failed. You need to know what broke and why, without opening 5 UIs.
Voraussetzungen
- dbt Cloud account + service token — dbt Cloud → Profile → API Tokens
- Local dbt project checkout (if using CLI tools) — git clone your dbt repo
Ablauf
-
Find the failing runList my last 10 job runs in dbt Cloud. Show which ones failed and their error summary.✓ Kopiert→ Failed run IDs with timestamps
-
Drill into the failing modelFor the failed run, which model failed first? Get its details (SQL, description) and its upstream lineage.✓ Kopiert→ Failing model + dependency chain
-
Propose fixRun the model locally with dbt compile. Inspect the compiled SQL for the error. Propose the minimum edit to fix.✓ Kopiert→ Concrete SQL fix with rationale
Ergebnis: A validated fix for a broken model in under 15 minutes.
Fallstricke
- Cloud run failures can be environmental (connection/credentials), not code — Before editing SQL, check if the same model runs locally via
runtool — if yes, it's infra not code