Independent guide

Slowly Changing Dimensions and Historical Context

Slowly changing dimensions define what happens when descriptive business data changes after facts have been recorded. A customer moves, a product changes category, or a territory gets reassigned, and the warehouse must decide whether old reports should reflect the earlier or current description. That decision is a matter of analytical meaning, not merely loading technique. This guide shows how to select a history pattern, implement it safely, and test the transitions that create reporting risk.

Work it out for your own case

Change the inputs and the figures update as you type. Nothing you enter leaves your browser.

Illustrative defaults — replace the unit prices with the ones on your own contract or price sheet.

Two line items only: what sits on disk, and what runs. Transfer, tooling and seat licences are separate bills and are not counted here.

Estimates for general guidance only. Real figures depend on the details you enter and on the provider you deal with.

Choose History Rules Attribute by Attribute

The central question is simple: when an attribute changes, should earlier facts keep the value that was true at the time, or should every report use the newest value? A corrected spelling often should replace the old text everywhere. A sales territory or customer classification may need history because users want to reproduce the organizational view that existed when an event occurred. Treating both changes alike creates either needless history or lost context.

Make the decision for each important attribute rather than assigning one blanket policy to a dimension. Meet with the people who own the related reports and ask how they investigate prior periods, restate results, and audit changes. The answer may differ across departments. If the warehouse must support both original and current views, the model may need separate attributes or a deliberate bridge between historical and current classifications.

Document the trigger as well as the policy. Differences in spaces, capitalization, formatting, or source cleanup should not always create a historical version. Define how values are normalized before comparison and which changes are material. Clear comparison rules prevent harmless source noise from filling a dimension with versions that carry no business meaning.

Understand the Main Change Patterns

An overwrite pattern updates the existing dimension row and keeps no prior value. It is appropriate for corrections and attributes where only the latest description matters. The approach is simple to query, but it changes how old facts appear because they join to the revised description. That consequence should be accepted explicitly, especially for reports that users expect to reproduce later.

A versioned-row pattern closes the existing row and inserts a new one. Both versions retain the same durable business identifier, while each has its own warehouse key and validity interval. Facts loaded after the change point connect to the new version; earlier facts continue to use the old one. This pattern preserves full history but requires careful handling of effective time, late data, and accidental overlaps.

A limited-history pattern keeps the current value and selected prior context in additional columns. It can answer a narrow question, such as the category immediately before the latest change, without generating more rows. It cannot reconstruct an extended sequence of changes, so its apparent simplicity has a firm analytical limit. Some attributes may also be fixed permanently once created. A single dimension can use different patterns when each attribute's business purpose is clear.

Load Versioned Rows Without Ambiguous Time

Versioned dimensions need a stable business identifier, a unique warehouse key, validity boundaries, and usually a current-row indicator. Define whether intervals include or exclude their endpoint and use the same convention in every pipeline and query. At any instant, one business identifier should resolve to no more than one valid dimension row. An overlap makes the fact lookup ambiguous, while a gap can send valid events to an unresolved member.

Order of operations matters. When a change arrives, compare the normalized tracked attributes, close the current version, create the replacement, and direct later facts to the correct key. The pipeline should be repeatable so rerunning the same input does not create duplicate versions. Record the source change time separately from the warehouse processing time when both are needed for audit or late-arrival handling.

Late facts require a time-aware lookup. A delayed transaction should connect to the dimension version valid when the transaction occurred, not automatically to the row that is current during loading. Late dimension changes require a defined correction policy because inserting a version into an existing timeline may require reassigning affected fact keys. Decide whether that repair is automatic, reviewed, or limited to a controlled window.

Test Transitions, Not Only Final Rows

Testing should follow a business entity through a sequence of changes. Begin with a new member, send an unchanged record, apply an overwrite attribute, apply a historical attribute, and replay the same inputs. Confirm that only material changes create versions, validity intervals remain continuous, and exactly one row is marked current. Then load facts before and after each boundary to verify that the lookup selects the intended version.

Add cases for null values, corrected timestamps, deleted source records, concurrent updates, and out-of-order delivery. Reconcile counts of changed, unchanged, inserted, and rejected records for every load. A sudden rise in new versions often signals a comparison defect or an upstream format change. Monitoring those outcomes is more informative than checking only the final row count.

Use the worksheet on this page to map each changing attribute to its reporting need, history policy, and validation case. Keep that map with the dimension contract so an engineer does not have to infer intent from pipeline code. Slowly changing dimensions remain trustworthy when the temporal rules are visible, consistently applied, and tested at the exact moments where one version gives way to another.

History requirements vary by business process, so confirm each attribute's reporting purpose before selecting a change pattern.

Questions

Common questions

Why are slowly changing dimensions needed?

They control how descriptive changes affect historical reporting. Without an explicit policy, a new customer category or territory assignment can silently rewrite earlier results or create inconsistent joins. The selected pattern lets the warehouse preserve, replace, or limit history according to a defined business need.

Which dimension changes should preserve history?

Preserve history when users must understand facts in the context that applied when those facts occurred. Organizational assignments, lifecycle stages, and meaningful classifications often qualify. Cosmetic corrections and fields used only for current contact or display purposes may be better candidates for overwrite.

How should late-arriving facts find a dimension row?

Look up the dimension version whose validity interval contains the fact's business event time. Using the currently active row can misclassify delayed events. The pipeline also needs a controlled fallback for facts that arrive before any matching dimension version is available.

Can one dimension use several history patterns?

Yes. History behavior is an attribute-level choice, so one field can overwrite while another creates a version and a third remains fixed. Mixing patterns is manageable when the rules are documented, the comparisons are normalized, and tests confirm the expected effect on prior facts.

Written & maintained by

Mustafa Bilgic — sole publisher, DataWarehousing.us

Mustafa Bilgic publishes independent, source-cited guides and free tools. This site takes no vendor sponsorship and sells no leads. Where a figure comes from a published source, that source is named on the page so you can check it yourself.

  • Sources: listed in full at the end of each guide.
  • Last reviewed: see the date shown on this page.

Compare on the things that actually differ

Read the comparison guides before you shortlist. Most of the difference between options sits in the detail, not the headline.

Back to the tool