debugging-dbt-runs
/debugging-dbt-runs
Diagnozuje i naprawia nieudane uruchomienia dbt: błędy Jinja i kompilacji, zależności ref i DAG, modele przyrostowe z błędnymi lub zduplikowanymi wierszami, full-refresh oraz problemy ze stanem i deferral.
- Autor
- unknown-333 ↗
- Repozytorium
- awesome-data-engineering-skills ↗
- Licencja
- Apache-2.0
- Ostatnia zmiana repozytorium
- 30.08.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 30.08.2026, bez odwołań do wycofanych modeli i API.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
Co robi i kiedy
Diagnozuje i naprawia nieudane uruchomienia dbt: błędy Jinja i kompilacji, zależności ref i DAG, modele przyrostowe z błędnymi lub zduplikowanymi wierszami, full-refresh oraz problemy ze stanem i deferral.
Oryginalny opis (EN)
Diagnose and fix failing dbt runs — Jinja/compilation errors, ref/dependency and DAG issues, incremental models producing wrong or duplicate rows, full-refresh needs, and state/deferral problems. Use when dbt run or dbt build fails, a model compiles wrong, an incremental model is stale or duplicated, or a CI dbt job errors.
Jak działa
- When to use
- Workflow
- Patterns
- Common pitfalls
Podgląd SKILL.md
---
name: debugging-dbt-runs
description: Diagnose and fix failing dbt runs — Jinja/compilation errors, ref/dependency and DAG issues, incremental models producing wrong or duplicate rows, full-refresh needs, and state/deferral problems. Use when dbt run or dbt build fails, a model compiles wrong, an incremental model is stale or duplicated, or a CI dbt job errors.
---
# Debugging dbt Runs
## When to use
- `dbt run`/`dbt build` fails or a model errors.
- Compilation/Jinja errors, or `ref()` cannot find a model.
- An incremental model is stale, missing rows, or has duplicates.
- CI dbt job behaves differently from local.
- Do NOT use for authoring new models/tests (use the building/testing skills).
## Workflow
```
- [ ] Read the actual error + the compiled SQL (target/compiled/...)
- [ ] Classify: compile/Jinja, dependency/DAG, incremental, or env/state
- [ ] Reproduce the smallest failing command
- [ ] Fix, then re-run just that node with --select
```
1. **Read the compiled SQL.** dbt writes it to `target/compiled/...`. Most
"weird" errors are obvious once you see the rendered SQL, not the Jinja.
2. **Classify the failure** and apply the matching fix below.
3. **Isolate** with `dbt run --select <model>` (and `+model`/`model+` for
upstream/downstream) rather than rebuilding everything.
4. **Re-run** the single node to confirm.
## Patterns
**Compilation / Jinja**
- `dbt compile --select <model>` and open `target/compiled/...` to see rendered SQL.
- Undefined variable/macro → check `{{ }}` names, `vars:`, and package installs
(`dbt deps`).
- "Model depends on a node that was not found" → a `ref()` name typo or the model
isn't in a selected path.
**Dependency / DAG**
- Circular dependency → two models `ref()` each other; break the cycle via an
intermediate model.
- `dbt ls --select +<model>` shows the upstream graph to trace missing nodes.
**Incremental problems**
- Duplicates after re-run → missing/incorrect `unique_key`, or `append` strategy
where `merge` was needed.
- Missing recent rows → the `is_incremental()` filter is too strict (no lookback)
or compares the wrong column.
- Schema changed and run fails → set `on_schema_change` or run
`dbt run --select <model> --full-refresh` once to rebuild.
- To rebuild from scratch: `dbt run --full-refresh --select <model>`.
**Environment / state**
- Works locally, fails in CI → different `--target`, missing `dbt deps`, or stale
`manifest.json` for `state:modified` selection. Regenerate/pass `--state`.
- `dbt build --select state:modified+ --defer --state <prod-manifest>` runs only
changed models against prod parents (Slim CI). A stale manifest selects the
wrong nodes.
## Common pitfalls
- **Debugging Jinja instead of compiled SQL** — always read the rendered query.
- **`--full-refresh` in production by reflex** — it rebuilds huge tables; only do
it when the incremental logic or schema genuinely changed.
- **Ignoring `dbt deps`** — missing packages cause macro-not-found errors in CI.
- **Assuming order** — dbt parallelizes; never rely on run order, only on `ref()`
dependencies.
- **Silent incremental drift** — add a periodic full-refresh or reconciliation
test to catch rows that the incremental filter missed.
Wersje
W bazie nie ma innych skilli o nazwie debugging-dbt-runs.
Migawka bazy z 13.11.2026 · wersja paczki df9fb1d8dbb9 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100dbt-expert
Pomaga w pracy z dbt na poziomie eksperckim: modele, testy, dokumentacja, modele przyrostowe, makra i szablony Jinja oraz struktura projektu ze źródłami, warstwą staging i marts. - 100debugging-dbt-errors
Systematycznie debuguje i naprawia błędy dbt, takie jak Compilation Error, Database Error, nieudane testy i niepoprawne wyniki modeli, sprawdzając najpierw modele nadrzędne i weryfikując poprawkę przez dbt build. - 100dbt-core
Obejmuje dbt Core do transformacji danych w SQL: struktura projektu, materializacje, szablony Jinja, testy, makra, pakiety, MetricFlow, dbt Mesh i CI/CD. - 100building-dbt-models
Buduje dobrze ustrukturyzowane modele dbt: warstwy staging, intermediate i marts, ref() i source(), materializacje oraz modele przyrostowe z właściwą strategią. - 100using-dbt-for-analytics-engineering
Buduje i modyfikuje modele dbt, pisze transformacje SQL z ref() i source(), tworzy testy i waliduje wyniki przez dbt show. - 100dbt-data-build-tool-modeling-testing
Przekształca surowe tabele hurtowni w przetestowane, udokumentowane modele wymiarowe w dbt i Jinja SQL.