lineage-fix
/lineage-fix
Odtwarza i naprawia błędne lub brakujące pochodzenie kolumn, źle odczytany graf DAG albo błędną formułę w Konstruct.
- Autor
- kodexlabsio ↗
- Repozytorium
- konstruct ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 12.11.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 12.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Odtwarza i naprawia błędne lub brakujące pochodzenie kolumn, źle odczytany graf DAG albo błędną formułę w Konstruct.
Oryginalny opis (EN)
Reproduce and fix wrong or missing column lineage, a misread DAG, or a wrong formula in Konstruct. Use when a trace, impact, explain or diff result is wrong for some SQL, dbt model, Airflow or Dagster file.
Jak działa
SKILL.md bez nagłówków drugiego poziomu · 31 linii, 186 słów
Podgląd SKILL.md
---
name: lineage-fix
description: Reproduce and fix wrong or missing column lineage, a misread DAG, or a wrong formula in Konstruct. Use when a trace, impact, explain or diff result is wrong for some SQL, dbt model, Airflow or Dagster file.
---
# Fixing a lineage bug
1. **Reproduce in isolation.** Reduce the input to the smallest SQL that shows the problem and check
it directly:
```bash
uv run python -c "
from konstruct.core.sql import analyse
for s in analyse('''<sql>''', dialect='duckdb', schema={'db.s.t': {'a': 'INT'}}):
print(s.target, s.columns, s.references, s.expressions, s.errors)
"
```
For a whole project: `uv run konstruct build <path>` then `konstruct trace`, `explain` or
`describe` on the column.
2. **Write the failing test** in `tests/test_sql.py` (lineage), `tests/test_explain.py` (formulas),
`tests/test_airflow.py` or `tests/test_dagster.py` (orchestration). Assert exact columns,
transforms and references.
3. **Find the cause.** Column lineage: `_column_lineage`, `_leaves` and `_references` in
`konstruct/core/sql.py`. Canonical expressions: `_Canonical`. Formulas: `Explainer.compose` in
`konstruct/analysis/explain.py`. dbt rendering without dbt: `konstruct/inputs/jinja.py`.
4. **Check against the data.** Lineage claims must survive `konstruct verify`
(`tests/test_verify.py`, including the differential property test). A fix that changes what is
claimed should run:
```bash
uv run pytest tests/test_sql.py tests/test_verify.py tests/test_properties.py tests/test_explain.py
KONSTRUCT_REALWORLD=1 uv run pytest tests/test_realworld.py # dbt Labs' jaffle-shop
```
5. **Mind the cost.** Changes to `sql.py` or `explain.py` should not slow builds:
`uv run .kodex/scripts/benchmark.py 500` before and after.
6. If the limitation cannot be fixed, document it in `docs/reference/limitations.md`.
Wersje
W bazie nie ma innych skilli o nazwie lineage-fix.
Migawka bazy z 13.11.2026 · wersja paczki bde4c7def888 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 3 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90konstruct
Odpowiada na pytania o stos danych z grafu dbt, źródeł, tabel, zadań DAG i pochodzenia kolumn. - 90konstruct
Wskazuje, skąd pochodzi kolumna, co czyta tabelę i jakie testy lub zadania od niej zależą, na podstawie grafu dbt. - 95data-airflow-dbt-orchestration
Łączy dbt z Apache Airflow 3: wzorzec integracji, DAG, ponawianie na poziomie modeli, lineage i harmonogram oparty na Assets. - 100query
Odpowiada na pytania o modele dbt: strukturę, lineage kolumn, konfigurację, schema.yml i wpływ zmian, zanim sięgnie po pliki. - 100tracing-downstream-lineage
Śledzi pochodzenie danych w dół łańcucha i ocenia wpływ zmian: co zależy od danej tabeli lub DAG-a i co się zepsuje po modyfikacji. - 90data-lineage
Rejestruje pochodzenie danych na poziomie tabel i kolumn, by odpowiadać na pytania o wpływ i proweniencję przed zmianami i w incydentach.