feat: CDC/SCD example notebook + CI notebook wiring#66
Merged
Conversation
Adds examples/cdc_scd_pipeline.ipynb — a showcase notebook that
stress-tests clgraph against a realistic Debezium CDC + SCD Type 2
pipeline (6 statements across 4 layers: raw CDC, staging, dim, fact,
mart) in the Databricks dialect. Demonstrates all 10 column-lineage
features recently closed by the CDC/SCD gap program:
- Gap 1 struct dot-access (after.id, after.name, ...)
- Gap 2 dedup via subquery + WHERE rn = 1 (qualify promotion)
- Gap 3/10 MERGE WHEN MATCHED condition columns
- Gap 4 self-referencing target (close-then-open SCD2)
- Gap 5 literal-only output columns ('Y' AS is_active)
- Gap 6 function-only outputs (current_timestamp())
- Gap 7 JOIN ON predicate columns, including BETWEEN
- Gap 8 WHERE clause filter columns
- Gap 9 MERGE ON literal-bound predicate (t.is_active = 'Y')
Wires `python run_all_notebooks.py --skip-llm` into CI as a new
`notebooks` job in .github/workflows/ci.yml so notebook execution is
enforced going forward.
Also marks the CDC/SCD design doc as fully resolved (all 10 gaps
closed) and polishes the gap 4 / gap 7 design docs with accurate line
references and edge-role naming. No behavior change in those docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
examples/cdc_scd_pipeline.ipynb— an end-to-end Debezium CDC → SCD Type 2 → fact → mart pipeline (6 statements, 4 layers, Databricks dialect) that stress-tests clgraph against realistic production shapes and showcases all 10 column-lineage features recently closed by the CDC/SCD gap program (gaps 1–10).python run_all_notebooks.py --skip-llminto CI as a newnotebooksjob in.github/workflows/ci.yml, so every example notebook is guaranteed to execute cleanly on every PR (was previously unenforced).docs/superpowers/specs/2026-04-13-cdc-scd-pipeline-gaps-design.md— progress summary, gap table, fix list, deliverables, and acceptance criteria all reflect that gaps 1, 2, 8 are now closed (alongside 3, 4, 5, 6, 7, 9, 10). All 10 gaps are resolved.cross_query_self_ref). No behavior change.What the notebook captures on the pipeline
after.id,after.name, …)access_type=struct,nested_pathWHERE rn = 1qualify_function=ROW_NUMBERWHEN MATCHED AND (…)condition columnsmerge_column_role=conditiondim_customer)'Y' AS is_active)current_timestamp()function-only sourceBETWEEN(point-in-time fact join)is_join_predicate=Truewhere_filteredges withwhere_conditionmetadatat.is_active = 'Y')merge_match_filteredgeTotal: 95 edges across 40 columns, 5 queries.
Test plan
uv run pytest tests/— 1562 passed, 41 skipped, 2 xfailed (unchanged from baseline)uv run python run_all_notebooks.py --skip-llm— 27/27 pass (including the new notebook)uv run ruff check examples/cdc_scd_pipeline.ipynb— cleanuv run ruff format --check examples/cdc_scd_pipeline.ipynb— cleannotebooksjob (verify after push)