debugging-dbt-errors

Solid

Debugs and fixes dbt errors systematically. Use when working with dbt errors for: (1) Task mentions "fix", "error", "broken", "failing", "debug", "wrong", or "not working" (2) Compilation Error, Database Error, or test failures occur (3) Model produces incorrect output or unexpected results (4) Need to troubleshoot why a dbt command failed Reads full error, checks upstream first, runs dbt build (not just compile) to verify fix.

Code & Development 120 stars 9 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
69
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# dbt Troubleshooting **Read the full error. Check upstream first. ALWAYS run `dbt build` after fixing.** ## Critical Rules 1. **ALWAYS run `dbt build` after fixing** - compile is NOT enough to verify the fix 2. **If fix fails 3+ times**, stop and reassess your entire approach 3. **Verify data after build** - build passing doesn't mean output is correct ## Workflow ### 1. Get the Full Error ```bash dbt compile --select <model_name> # or dbt build --select <model_name> ``` Read the COMPLETE error message. Note the file, line number, and specific error. ### 2. Inspect Actual Data (For Data Issues) **Before fixing "wrong output" or "incorrect results", query the actual data:** ```bash # Preview current output dbt show --select <model_name> --limit 20 # Check specific values with inline query dbt show --inline "select * from {{ ref('model_name') }} where <condition>" --limit 10 # Compare with expected - look for patterns dbt show --inline "select column, count(*) from {{ ref('model_name') }} group by 1 order by 2 desc" --limit 10 ``` **Understand what's wrong before attempting to fix it.** ### 3. Read Compiled SQL ```bash cat target/compiled/<project>/<path>/<model_name>.sql ``` See the actual SQL that will run. ### 4. Analyze Error Type | Error Type | Look For | |------------|----------| | Compilation Error | Jinja syntax, missing refs, YAML issues | | Database Error | Column not found, type mismatch, SQL syntax | | Dependency Error | Missing model, circular re...

Details

Author
AltimateAI
Repository
AltimateAI/data-engineering-skills
Created
7 months ago
Last Updated
1 months ago
Language
N/A
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category