State ↔ State Alignment
State ↔ State Alignment joins two historized state sources across overlapping valid-time intervals.
Two historized sources can both be correct but still fail when joined.
Historical reporting often requires joining two sources that both describe changing state over time. The challenge is not just joining by business key. The model must decide which versions were valid at the same reporting date.
Contract state and customer state change on different dates.
Expected Result (Recommended)
Common Wrong Result (Risk)
The joined table should only contain periods where both source states are stable. If one side changes, the joined interval must split.
Try this State ↔ State Alignment case in Target Table Validation
Use these sample target tables to test the validator:
- Copy one of the target tables below.
- Open Target Table Validation.
- Paste the copied table as your target output.
- Check whether the result is aligned or too coarse.
Each source has its own timeline and change frequency.
A contract can change status over time. A customer can change segment over time. A product can change category or price over time. When both sides are historized, the join must align two timelines instead of simply matching keys.
Join on business key and overlapping valid-time intervals.
left.business_key = right.business_key
AND intervals_overlap(
left.valid_from,
left.valid_to,
right.valid_from,
right.valid_to,
boundary_convention
)The exact overlap predicate depends on your interval convention, for example closed daily intervals or half-open timestamp intervals. The important rule is that every temporal join uses the same boundary semantics consistently.
Validate the joined history, not only each source table.
The Workbench can surface state-state alignment risks.
State-state joins are one of the most common sources of historical reporting bugs.
The data can look correct in each source independently, but the combined history can still produce gaps, duplicates or incorrect attribution.
Validating the join result is often more important than validating each source table in isolation.
Validate temporal joins before they reach reporting.
Use the Historical Modeling Workbench to detect gaps, ambiguous matches, overlapping versions and unintended temporal join splits.
Open Historical Modeling Workbench →