altimate-code
Delegates dbt and warehouse work to altimate-code, a specialized CLI agent with 100+ purpose-built data tools. USE THIS SKILL…
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
$ npx -y skills add AltimateAI/data-engineering-skills --skill debugging-dbt-errors --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/debugging-dbt-errorsContext preview
The summary Claude sees to decide when to auto-load this skill.
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
name: debugging-dbt-errors description: | 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.
**Read the full error. Check upstream first. ALWAYS run `dbt build` after fixing.**
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
dbt compile --select <model_name> # or dbt build --select <model_name>
Read the COMPLETE error message. Note the file, line number, and specific error.
**Before fixing "wrong output" or "incorrect results", query the actual data:**
# 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.**
cat target/compiled/<project>/<path>/<model_name>.sql
See the actual SQL that will run.
| 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 reference |
# Find what this model references
grep -E "ref\(|source\(" models/<path>/<model_name>.sql
# Read upstream model to verify columns
cat models/<path>/<upstream_model>.sqlMany errors come from upstream changes, not the current model.
Common fixes:
| Error | Fix | |-------|-----| | Column not found | Check upstream model's output columns | | Ambiguous column | Add table alias: `table.column` | | Type mismatch | Add explicit `CAST()` | | Division by zero | Use `NULLIF(divisor, 0)` | | Jinja error | Check matching `{{ }}` and `{% %}` |
dbt build --select <model_name>
**3-Failure Rule**: If build fails 3+ times, STOP. Step back and: 1. Re-read the original error 2. Check if your entire approach is wrong 3. Consider alternative solutions
# Preview the data dbt show --select <model_name> --limit 10 # Run tests dbt test --select <model_name>
**After fixing, re-read the original request and verify:**
# Find downstream models
grep -r "ref('<model_name>')" models/ --include="*.sql"
# Rebuild downstream
dbt build --select <model_name>+Claude Code skills for Analytics & Data engineers working with dbt and Snowflake Altimate Data Skills is a collection of Claude Code skills that encode the workflows and best practices of experienced analytics engineers.
Delegates dbt and warehouse work to altimate-code, a specialized CLI agent with 100+ purpose-built data tools. USE THIS SKILL…
Analyze DBSQL queries, including SQL embedded in notebooks (`spark.sql(...)`, `%sql` cells), for anti-patterns, lint issues, and…
Creates dbt models following project conventions. Use when working with dbt models for: (1) Creating new models (any layer -…
Develops and troubleshoots dbt incremental models. Use when working with incremental materialization for: (1) Creating new…
Documents dbt models and columns in schema.yml. Use when working with dbt documentation for: (1) Adding model descriptions or…
Converts legacy SQL to modular dbt models. Use when migrating SQL to dbt for: (1) Converting stored procedures, views, or raw SQL…