Home › Key concepts › Slowly changing dimensions

Key concept · Walk (intermediate) · the same on every platform

Slowly changing dimensions

How to record that a customer moved city, without rewriting history.

What it is

Descriptions change over time. Type 1 overwrites the old value, so history shows the new one. Type 2 adds a new row with valid-from and valid-to dates, so last year's sales stay with last year's city.

Why it matters

Without it, moving one customer quietly changes last year's regional sales report.

An example

Asha moves from Pune to Sydney: her old row is closed on 15 Nov, a new Sydney row opens, and past orders still count for Pune.

The common mistake

Using Type 1 everywhere, then being asked why last year's numbers changed.

Where you meet it on each platform

The idea stays the same; only the product name changes.

JobAWSAzureGoogle CloudDatabricksOpen source
SQL modellingturn raw tables into clean, tested, documented onesdbt on Redshift or Athenadbt on FabricDataform or dbt on BigQueryLakeflow Declarative Pipelines or dbtdbt with DuckDB

Related ideas

Where it shows up

Part of the Walk level on these paths: Data Engineering (shaping data).