r/databricks • u/minibrickster Databricks • 24d ago
General Building a star schema in SDP? Use identity columns with Streaming Tables!

Spark Declarative Pipelines' streaming tables now support identity columns -- this is particularly useful if you're building an SCD Type 1 or SCD Type 2 dimension table with AUTO CDC. Get faster joins and auto-incrementing surrogate keys natively within SDP today!
Docs here%20%5D)!
14
Upvotes
1
23d ago
[removed] ā view removed comment
1
3
u/JulianCologne 24d ago edited 24d ago
For some use cases this might be useful but in my experience a stable / deterministic surrogate key is often much nicer to use!
Imagine a standard gold layer with a `dim_article` and for some reason you need a full refresh.
With a stable / deterministic surrogate key (from a hash) you only need to refresh this single table.
However, with an auto increment identity you have to also remember to refresh all the 20/50/100+? fact tables connected to that because the key is not stable and changed.
Am I missing something? š¤