Back to Learn
Composite pattern

Dimension Completion

Resolve missing historical dimension coverage before it breaks temporal joins, snapshots and reporting.

Dimension completion gives every required fact period a deliberate dimensional context. It prevents valid facts from losing attributes or disappearing because the related dimension history starts later, ends earlier or contains gaps.

The problem

A fact exists, but no valid dimension row covers the same period.

Historical fact and dimension models often begin at different points in time. A contract, transaction or monthly snapshot can exist before the related customer, product, hierarchy or ownership history was captured.

The fact row can be valid and the dimension can also be technically valid. The problem is that their temporal coverage does not align.

A temporal join then returns no match. Depending on the query, this can create missing attributes, unknown values or complete loss of the fact row.

Worked scenario

The contract exists from January, but the customer assignment starts in April.

Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Contract fact
JanDec
Customer dimension
AprDec
February snapshot
?
Snapshot date: February 2024

The contract exists. The customer assignment has not been observed yet. What should reporting show?

GOOD - Expected result
ContractC-1001
CustomerCustomer A
ReasonEarliest known customer assignment completed backward
RISK - Common wrong result
ContractC-1001
CustomerNULL or Unknown
ReasonNo valid customer row exists in February
Reporting date: February

The contract exists in February, but the customer dimension has no valid row. Without an explicit completion rule, the snapshot loses the dimension attributes or fails the temporal join.

Core concept

SCD2 preserves captured history, but does not guarantee required reporting coverage.

A Slowly Changing Dimension Type 2 model records the versions that were captured. It does not automatically guarantee that every fact date has one matching dimension version.

Historical reporting normally depends on two separate guarantees:

Captured dimension changes are preserved correctlyEvery required fact period resolves to one intended dimension state

A dimension may satisfy the first guarantee and still fail the second. Dimension completion addresses that missing coverage.

Descriptive example

Compare required fact periods with the resulting dimension coverage.

Dimension completion cannot be proven from one target table alone. The required reporting periods must be compared with the dimension result produced for those periods.

Both examples below use the same required monthly contract periods. The difference is whether every period receives one deliberate and explainable customer result.

Required fact coverage

These are the reporting periods for which the contract must resolve to an intended customer dimension state.

contract_id,snapshot_date
C-1001,2024-01-31
C-1001,2024-02-29
C-1001,2024-03-31
C-1001,2024-04-30
C-1001,2024-05-31
C-1001,2024-06-30
Deliberately completed coverage

January through March are not directly observed, but the earliest known customer assignment is deliberately completed backward and its provenance remains visible.

contract_id,customer_key,snapshot_date,completion_method
C-1001,Customer A,2024-01-31,earliest_known_value_backfill
C-1001,Customer A,2024-02-29,earliest_known_value_backfill
C-1001,Customer A,2024-03-31,earliest_known_value_backfill
C-1001,Customer A,2024-04-30,observed
C-1001,Customer A,2024-05-31,observed
C-1001,Customer A,2024-06-30,observed
Dimension coverage deliberately completed
Every required snapshot period has one customer resultObserved and completed periods remain distinguishableThe completion method is explicitNo required fact period remains unresolved
Unresolved dimension coverage

January through March are required by the fact history, but no customer assignment has been resolved for those periods.

contract_id,customer_key,snapshot_date,completion_method
C-1001,,2024-01-31,missing_dimension_match
C-1001,,2024-02-29,missing_dimension_match
C-1001,,2024-03-31,missing_dimension_match
C-1001,Customer A,2024-04-30,observed
C-1001,Customer A,2024-05-31,observed
C-1001,Customer A,2024-06-30,observed
Unresolved dimension coverage
Required snapshot periods exist without a customer resultmissing_dimension_match records the unresolved stateAn inner join could silently remove valid factsA business-approved completion decision is still required
Why it happens

Fact and dimension histories often come from different systems and processes.

The fact source contains deeper history than the dimension sourceDimension records arrive later than the facts they describeA migration starts historizing attributes only from a cutover dateA hierarchy or ownership source contains temporal gapsHistorical backfills reconstruct facts but not dimensionsSources use different effective-date semanticsDimension processing finishes after snapshot publication
Where it appears

Dimension completion is common in cross-system historical models.

Insurance

A policy exists before reliable policyholder or ownership history becomes available.

Sales reporting

Revenue history exists before territory, account or sales hierarchy history was tracked.

Product reporting

Sales facts exist before product categories, classifications or risk attributes were historized.

Lakehouse migrations

A new historical model requires dimension coverage that was never fully stored by the source.

Completion strategies

Choose a deliberate rule for every uncovered period.

There is no universal completion strategy. The correct approach depends on what the missing period means and what historical evidence is available.

Earliest known value backfill

Extend the earliest observed value backward when evidence supports that it already applied.

Carry forward

Continue the last known value when the state remains valid until explicitly replaced.

Unknown member

Preserve the fact without claiming a historical value that cannot be supported.

Synthetic history

Reconstruct missing intervals from events, snapshots, audits or other historical evidence.

Preserved gap

Keep the period uncovered when unknown or unassigned is the correct business truth.

Rejected output

Stop publication when complete dimension coverage is a required model invariant.

Implementation walkthrough

Complete or classify the dimension gap before joining it to the fact model.

Define the fact periods required by reportingMeasure dimension coverage per business keyIdentify every uncovered intervalClassify each gap as unknown, invalid or reconstructableApply the approved completion ruleRecord completion provenanceJoin facts to the completed dimensionValidate the result against the intended semantics
Validation checks

Every required fact period should resolve predictably.

Every required fact date has an intended dimension resultNo fact rows disappear because of an inner joinNo fact row resolves to multiple dimension versionsCompleted values remain identifiableCompletion methods are documentedBackfill assumptions are business-approvedUnknown-member usage is measurablePreserved gaps remain visibleLate-arriving records do not silently rewrite published resultsSnapshot completeness remains stable across rebuilds
Common mistakes

Completion logic can create false history when used without semantic controls.

Extending the earliest value backward by defaultUsing an inner join and silently dropping unmatched factsTreating every missing value as the same kind of unknownUsing current dimension values for historical factsCompleting history without recording provenanceAllowing overlapping completed intervalsApplying different completion rules in different reportsRebuilding old snapshots with new history without recorded-time controls
Design trade-off

Completeness, historical accuracy and reproducibility are separate goals.

A fully populated report may appear more complete while being less historically accurate. A preserved gap may be accurate but harder for downstream users to consume.

Published reporting adds another constraint. A correction introduced today may change what an old snapshot shows unless the model also preserves what was known at the original reporting time.

Why it matters

A correct fact table can still produce unreliable historical reporting.

Without dimension completion, snapshot facts may be technically correct but analytically unusable. Reports can lose attributes, exclude valid facts or change after rebuilds.

Dimension completion makes the missing coverage decision explicit. The model reconstructs the state, uses a controlled fallback, preserves the gap or rejects the output.

The goal is not to populate every field. The goal is to give every reporting period one deliberate, explainable and reproducible outcome.

Apply the pattern

Review a model for missing dimension coverage.

Describe the fact and dimension timelines. The assistant will help identify uncovered periods, evaluate completion strategies and make the assumptions behind the historical join explicit.

Open Historical Data Assistant