Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124

In the world of analytics and data warehousing, one of the trickiest challenges is keeping track of how things change over time.
In operational systems, these changes often overwrite the old value without a second thought. But in analytical systems, overwriting the past can break your historical reporting.
This is where Slowly Changing Dimensions (SCDs) come in. These are a set of modelling techniques designed to store and manage dimension data that changes infrequently while retaining historical accuracy.
In dimensional modelling (pioneered by Ralph Kimball), facts are the measurable events, like sales transactions, while dimensions are the descriptive attributes that give facts meaning.
Examples of dimensions:
Most of these do not change frequently. This makes them slow-moving data — but when they do change, the impact on reporting can be significant.
Let’s say Alice Wong was a customer living in London from 2019 to 2024, and then moved to Manchester.
If your customer dimension only stores one row per customer, and you simply update her city from London to Manchester, then:
SCDs solve this by allowing you to record both past and current attribute values.
The Kimball methodology and industry practice define several SCD strategies. Each type offers different trade-offs between simplicity, storage cost, and historical accuracy.
| PRODUCT_NAME | LAUNCHED_ON |
|---|---|
| iPhone | 29-06-2007 |
| ChatGPT | 30-11-2022 |
If there is a request to alter the launch date of the iPhone from the 29th June 2007 it would be rejected.
SQL Example:
In this example we have noticed typos in the product names:
| PRODUCT_NAME | LAUNCHED_ON |
|---|---|
| iZhone | 29-06-2007 |
| ChatQPT | 30-11-2022 |
Therefore we make the corrections, but we lose the original values and do no preserve any history.
UPDATE PRODUCT
SET PRODUCT_NAME = 'iPhone'
WHERE PRODUCT_NAME = 'iZhone';
UPDATE PRODUCT
SET PRODUCT_NAME = 'ChatGPT'
WHERE PRODUCT_NAME = 'ChatQPT';Which leaves us with:
| PRODUCT_NAME | LAUNCHED_ON |
|---|---|
| iPhone | 29-06-2007 |
| ChatGPT | 30-11-2022 |
start_date, end_date, and current_flag.Pros: Full historical accuracy.
Cons: More storage, slightly more complex queries.
| PRODUCT_NAME | LAUNCHED_ON | STARTED_AT | ENDED_AT | IS_CURRENT |
|---|---|---|---|---|
| iZhone | 29-06-2007 | 01-06-2007 | 12-12-2070 | TRUE |
| ChatQPT | 30-11-2022 | 01-01-2022 | 12-12-2070 | TRUE |
Again, in this example we correct the typos in the product names, but this time preserving history. We hame this change on 06-06-2025.
| PRODUCT_NAME | LAUNCHED_ON | STARTED_AT | ENDED_AT | IS_CURRENT |
|---|---|---|---|---|
| iZhone | 29-06-2007 | 01-06-2007 | 06-06-2025 | FALSE |
| ChatQPT | 30-11-2022 | 01-01-2022 | 06-06-2025 | FALSE |
| iPhone | 29-06-2007 | 06-06-2025 | 12-12-2070 | TRUE |
| ChatGPT | 30-11-2022 | 06-06-2025 | 12-12-2070 | TRUE |
Pros: Quick to query for comparisons.
Cons: Can only store a small number of changes.
| PRODUCT_NAME | PREVIOUS_COLUMN_NAME | LAUNCHED_ON |
|---|---|---|
| iPhone | Apple Phone | 29-06-2007 |
| ChatGPT | Talkie Box | 30-11-2022 |
dim_customer and dim_customer_history.Pros: Easy to query current state.
Cons: Requires joining two tables for full history.
| PRODUCT_ID | PRODUCT_NAME | LAUNCHED_ON |
|---|---|---|
| 101 | iPhone | 29-06-2007 |
| 102 | ChatGPT | 30-11-2022 |
| PRODUCT_HISTORY_ID | PRODUCT_ID | PRODUCT_NAME | EFFECTIVE_ON |
|---|---|---|---|
| 1 | 101 | iZhone | 01-01-2007 |
| 2 | 101 | iPhone | 01-02-2027 |
Type 5 builds on Type 4 by adding a “current profile” mini-dimension key to the base dimension and overwriting it as a Type 1 attribute. This lets users see current mini-dimension values alongside base attributes without joining through the fact table. In the presentation layer, the base and outrigger are shown as one table, with clearly named columns like “Current Income Level.” ETL overwrites the Type 1 reference whenever the profile changes, and if performance lags, the mini-dimension attributes can be embedded directly into the base dimension.
MERGE statements with date logic.ARRAY_AGG and QUALIFY for history.change_reason column for transparency.current_flag — Speeds up “current state” queries.Slowly Changing Dimensions are about preserving truth over time.
Without them, your analytics lose credibility. With them, you gain:
In the age of real-time analytics, streaming data, and machine learning, SCDs still matter. Even as event sourcing and immutable data lakes rise in popularity, dimension changes still need explicit modelling — and the SCD framework remains the industry’s common language for doing so.