docs: add SCD/dimensional modeling reference for databricks-dbsql - #207
Open
dipayanthedata wants to merge 1 commit into
Open
docs: add SCD/dimensional modeling reference for databricks-dbsql#207dipayanthedata wants to merge 1 commit into
dipayanthedata wants to merge 1 commit into
Conversation
…rrogate key patterns Adds skills/databricks-dbsql/references/dimensional-modeling.md covering: - SCD type selection decision table - Surrogate key strategies (IDENTITY column vs xxhash64 hash key) - Complete two-pass MERGE for SCD Type 2 (expire + insert, with correct LEFT JOIN guard) - SCD Type 6 hybrid pattern (Type 2 rows + current_* column refresh) - Liquid Clustering key guidance for dim/fact tables + Predictive Optimization enable syntax - DEEP CLONE for environment promotion (dev/staging/prod) - Common issues table Wires new file into databricks-dbsql SKILL.md Quick Reference and Reference Files tables. Regenerates manifest.json and all four plugin bundles via scripts/skills.py generate. Fills the gap identified in #-- (no assembled dimensional modeling implementation guide; best-practices.md covers architecture but leaves SCD implementations incomplete; SCD Type 6, hash surrogate keys, and Deep Clone were absent from the skill entirely). Signed-off-by: Dipayan Das <dipayandas.data@gmail.com>
dipayanthedata
requested review from
lennartkats-db and
simonfaltum
as code owners
July 11, 2026 07:19
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.
What
Adds skills/databricks-dbsql/references/dimensional-modeling.md — implementation
patterns for SCD Type 1/2/6, surrogate keys (IDENTITY vs hash), Liquid Clustering
promotion. Wires the new reference into the parent SKILL.md.
Why
The existing skill covers architecture (best-practices.md) and streaming CDC
(databricks-pipelines) but had no batch SQL implementation guide for SCD patterns
— Type 2 was previously a one-line comment, Type 6, hash surrogate keys, and Deep
Clone promotion were absent entirely.
Verification
All Databricks-specific syntax and behavior claims were checked against current
docs.databricks.com pages (predictive optimization, Delta/Iceberg clone, identity
columns, Lakeflow pipeline limitations) as of July 2026 — sources noted inline
where non-obvious. The SCD Type 2 two-pass MERGE was hand-traced against a 3-row
worked example (initial load, one changed row, one net-new row) since no live
warehouse was available in this environment to execute it directly; a maintainer
should run it once against real data before merge.
python3 scripts/skills.py generateandvalidateboth pass clean.Notes for reviewers
happy to have this migrated/adapted however fits your internal process.
extract; it does not handle delete detection (documented as a caveat in the file).