Data Engineering / Intermediate: change, time and coordination / Lesson 14
Temporal joins and versioned dimensions
Join a fact to the intended historical dimension version using explicit validity boundaries.
On this page
Lesson goals
- Define a nonoverlapping validity interval for a dimension version.
- Diagnose missing or multiple temporal matches and reconcile late facts.
- Apply half-open validity intervals to fact event times and detect gaps or overlaps.
- Reconcile late facts and historical corrections at one-row-per-fact grain.
Define the historical question
A shipment fact can arrive today while describing an order placed last month. If a customer’s region changed between those times, joining only to the current region answers a different question from reporting the region valid when the order occurred. State which business clock and timezone apply, whether historical corrections are allowed, and the expected grain of both the fact and dimension before writing the join.
Model adjacent validity intervals
The synthetic dimension contains two versions for customer C1. This lesson uses half-open intervals: valid_from is included and valid_to is excluded. The versions touch at February 1 without overlapping, so that boundary belongs to the second version. This JSON array illustrates the data contract rather than a database schema. An open-ended current version needs its own explicit representation and comparison rule.
[{"customer":"C1","valid_from":"2026-01-01","valid_to":"2026-02-01","region":"north"},{"customer":"C1","valid_from":"2026-02-01","valid_to":"2026-03-01","region":"south"}]
The half-open intervals meet without sharing the boundary date.
Resolve a boundary fact
Order O7 occurs exactly at the boundary and therefore matches the south version under the stated rule. A condition that treats both interval ends as inclusive would match both versions, multiplying the fact. Conversely, a gap in the dimension could produce no match. Preserve the unmatched or multiply matched fact for investigation instead of arbitrarily selecting a row and hiding the defect.
{"order_id":"O7","customer":"C1","event_date":"2026-02-01","expected_region":"south"}
The expected region follows the declared half-open interval; no database query is executed.
Handle late and corrected information
A late-arriving fact should use its defined event time rather than the ingestion time when the business question is historical. A later correction to dimension history may require a controlled rebuild of affected facts or an explicitly versioned correction, depending on the contract. Record the source version and publication identity so consumers can distinguish a corrected result from the original report.
Test coverage and uniqueness
In an isolated fixture, test a fact immediately before the boundary, one exactly at it and one outside all intervals. Also introduce an overlapping dimension version to confirm that multiple matches are flagged. Compare the fact count, unmatched keys and resulting aggregate with independently calculated expectations. Do not publish until the owner has resolved or explicitly accepted any unmatched or ambiguous records.
Define the historical question and grain
A temporal join connects a fact to the dimension version valid at a chosen business time. First state what one fact row represents, what identifies the dimension entity and which clock determines the lookup. A shipment arriving today can describe an order placed last month; joining to the customer’s current region answers a different question from joining to the region valid on the order date. An ingestion timestamp is not a substitute for event time unless the report contract explicitly chooses it. Record the timezone and precision when timestamps, rather than dates, determine membership.
The expected result grain is normally one enriched row per fact. That expectation is a rule to verify, not a consequence of writing a JOIN. For each fact count matching dimension versions: zero indicates a gap or missing entity; more than one indicates overlap or an incomplete rule. Preserve the fact identity and candidate evidence instead of letting an inner join silently drop it or arbitrarily choosing a version. Decide whether the owner blocks publication, quarantines the fact or permits a labeled exception.
Use consistent half-open intervals
A common validity convention is [valid_from, valid_to): the start is included and the end is excluded. Adjacent versions [January 1, February 1) north and [February 1, March 1) south meet without sharing a date. A fact on February 1 matches south only. If both ends are inclusive, the boundary matches both and the fact can be multiplied. If the second interval starts February 2 instead, February 1 is a gap and has no match. Test the instant just before, exactly at and just after each boundary.
An open-ended version needs an explicit representation, such as a NULL valid_to with a predicate that treats it as unbounded. A plain comparison event_time < NULL is unknown in SQL and will not match. Avoid sentinel dates unless their meaning and range are documented. Check that valid_from precedes valid_to, that intervals for the same entity do not overlap, and that required coverage has no gaps. A database may enforce some of these constraints, but the exact mechanism is engine-specific.
Preserve and reconcile match multiplicity
A conceptual temporal predicate combines entity identity with event_time >= valid_from and event_time < valid_to, plus the documented open-end condition if present. Use a left join when the audit must retain facts with no version. Count a non-NULL dimension version key per fact to distinguish zero, one and multiple matches; COUNT(*) counts the NULL-extended row and cannot by itself establish one real match. Group by the fact identity, not merely by customer, or distinct facts can be collapsed.
A dimension overlap can inflate a measure: a single 10-unit fact matching north and south yields two joined rows and a naive sum of 20. SUM(DISTINCT amount) is not a general repair because two different facts may legitimately have the same amount. Resolve the validity history or apply an explicitly authorized tie rule, then recompute and reconcile. The latest loaded row is not automatically the historically correct version.
Handle late facts and corrected history
A late-arriving fact should use the clock required by the business question. If an order occurred January 20 but arrived February 10, a report of region at order time uses the January version even though the current region may be south. Preserve both event and ingestion timestamps so that lateness and historical assignment can be audited. A dimension version itself may arrive late, leaving a fact temporarily unmatched; define a holding or reprocessing path instead of replacing missing history with the current value without authorization.
A correction to historical dimension validity can change previously enriched facts. Identify the affected entity and time range, rebuild or publish a versioned correction according to contract, and record both source dimension version and output publication identity. If consumers require the original report as well as the corrected one, define retention and interpretation for each. Historical business validity and the time the warehouse learned a correction are different clocks; a one-dimensional validity interval alone may not answer both questions.
Test history, boundaries and publication
Create synthetic versions for multiple customers, including adjacent intervals, a deliberate gap, an overlap and an open end. Test a fact before a boundary, exactly at it, after it, outside coverage and for an unknown key. Check that each expected one-to-one fact has exactly one matching version; retain zero and multiple matches with reasons. Compare source fact keys and measures with the enriched output so an omitted or duplicated fact cannot hide behind a coincidentally equal total.
Test late-arriving facts and a corrected dimension version, then verify the chosen backfill or revision policy with downstream consumers. Use a consistent source snapshot or documented version so concurrent dimension edits do not silently change the run. PostgreSQL documentation supports the general join and comparison concepts, but the traces below are non-runnable synthetic models rather than claims of a particular warehouse execution. No database or external service is accessed.
20 worked examples
1. Before boundary
Problem: Which region matches a C1 fact dated January 31 under the fixture?
- January 31 is at or after the north start January 1.
- It is before the exclusive north end February 1.
C1 north [2026-01-01,2026-02-01); C1 south [2026-02-01,2026-03-01)
fact=O1,C1,2026-01-31
north
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: north.
Why this result follows: The half-open north interval contains January 31 without overlapping the next version.
2. At boundary
Problem: Which region matches a C1 fact exactly at the February boundary?
- The north version excludes its February 1 end.
- The south version includes its February 1 start.
C1 north [2026-01-01,2026-02-01); C1 south [2026-02-01,2026-03-01)
fact=O7,C1,2026-02-01
south
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: south.
Why this result follows: Adjacent half-open intervals assign the shared boundary to the later version once.
3. After boundary
Problem: Which region matches a C1 fact dated February 2 under the fixture?
- February 2 is after the south start February 1.
- It is before the south exclusive end March 1.
C1 north [2026-01-01,2026-02-01); C1 south [2026-02-01,2026-03-01)
fact=O2,C1,2026-02-02
south
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: south.
Why this result follows: The event date lies inside the second half-open validity interval. This follows the stated synthetic validity rule.
4. Exclusive final end
Problem: What happens to a C1 fact exactly on March 1 in the bounded fixture?
- The south interval excludes its end date March 1.
- No later version is declared in this synthetic fixture.
C1 north [2026-01-01,2026-02-01); C1 south [2026-02-01,2026-03-01)
fact=O3,C1,2026-03-01
No matching version.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: Zero matches; retain O3 for investigation.
Why this result follows: A bounded half-open end does not include the boundary without a following version.
5. Before coverage
Problem: What happens to a fact before the first declared C1 version?
- December 31 precedes the first start date January 1.
- Neither declared interval covers that date. The stated interval convention determines the match.
C1 north [2026-01-01,2026-02-01); C1 south [2026-02-01,2026-03-01)
fact=O4,C1,2025-12-31
No matching version.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: Zero matches; retain O4 as unmatched.
Why this result follows: Validity coverage must be checked for the fact’s chosen business time. This follows the stated synthetic validity rule.
6. Unknown entity
Problem: What matches a C2 fact when the dimension contains only C1 versions?
- The dimension rows are both for customer C1.
- The fact’s entity key is C2, so the identity condition fails.
C1 north [2026-01-01,2026-02-01); C1 south [2026-02-01,2026-03-01)
fact=O5,C2,2026-01-15
No matching version.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: Zero matches for O5.
Why this result follows: A temporal match requires both entity identity and interval membership. This follows the stated synthetic validity rule.
7. Inclusive overlap
Problem: What happens at February 1 if both adjacent ends are treated as inclusive?
- The inclusive north end contains February 1.
- The inclusive south start also contains February 1. The stated interval convention determines the match.
C1 north [Jan 1,Feb 1] and south [Feb 1,Mar 1]
fact=O7,C1,Feb 1
Two matches: north and south.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: O7 matches two versions.
Why this result follows: Inclusive adjacent endpoints overlap and can multiply one fact. This follows the stated synthetic validity rule.
8. Gap
Problem: What happens when successive versions leave February 1 uncovered?
- The north interval ends before February 1 is included.
- The south interval does not start until February 2.
C1 north [Jan 1,Feb 1); south [Feb 2,Mar 1)
fact=O8,C1,Feb 1
No matching version.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: O8 has zero matches.
Why this result follows: A gap between half-open intervals leaves a fact without historical coverage. This follows the stated synthetic validity rule.
9. Overlap
Problem: How many versions match a fact inside these overlapping intervals?
- February 5 is inside the north interval ending February 10.
- It is also inside the south interval beginning February 1.
C1 north [Jan 1,Feb 10); south [Feb 1,Mar 1)
fact=O9,C1,Feb 5
Two matches.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: O9 matches both versions.
Why this result follows: Overlapping validity intervals violate the intended one-version-per-fact rule. This follows the stated synthetic validity rule.
10. Open end
Problem: Which version matches a later fact under an explicit unbounded-end policy?
- The fact date is after the south start.
- The declared NULL-end policy treats the version as having no upper boundary.
C1 south: valid_from=2026-02-01, valid_to=NULL
policy: NULL valid_to means unbounded
fact=O10,C1,2026-04-01
south
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: south.
Why this result follows: An open-end representation needs a matching rule rather than an ordinary comparison to NULL.
11. Late fact
Problem: Which region applies to a January order arriving in February?
- The event occurred January 20 within the north interval.
- The later February arrival does not change the selected business clock.
C1 north [2026-01-01,2026-02-01); C1 south [2026-02-01,2026-03-01)
fact=O11,C1,event=2026-01-20,arrival=2026-02-10
contract: join on event date
north
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: north.
Why this result follows: Historical enrichment follows the declared event date rather than ingestion date. This follows the stated synthetic validity rule.
12. Current-region contrast
Problem: What does joining the same late fact only to current south region answer?
- The current dimension value is south at the time of the later read.
- The historical interval for the fact’s January event is north.
fact=O11,event=Jan 20,arrival=Feb 10
current region=south; historical Jan 20 region=north
It reports current south, not region at order time.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: The two joins answer different questions.
Why this result follows: A current-state lookup cannot replace a historical validity lookup without changing meaning.
13. Fact multiplication
Problem: What sum results if one fact matches two overlapping versions?
- The overlap produces two joined rows for the single fact.
- Each joined row repeats amount 10, giving a naive sum of 20.
fact O12 amount=10
matched versions=[north,south]
naive joined SUM(amount)
20
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: 20 instead of the fact amount 10.
Why this result follows: Temporal overlap changes join multiplicity and can inflate fact-level measures. This follows the stated synthetic validity rule.
14. Distinct amount trap
Problem: Can SUM(DISTINCT amount) safely preserve two separate equal-valued facts?
- The two fact ids represent separate business events.
- Deduplicating the shared amount 10 removes one legitimate contribution.
facts=[(O1,10),(O2,10)]
intended sum by fact identity
SUM=20; SUM(DISTINCT amount)=10
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: Distinct amount undercounts by 10.
Why this result follows: Measure equality does not establish fact identity or repair temporal multiplicity. This follows the stated synthetic validity rule.
15. Left audit
Problem: How should a missing temporal match appear in a left-join audit?
- The left join preserves both fact identities.
- The missing dimension side for O2 has a NULL version key, ignored by its count.
facts=[O1 matches V1, O2 has no version]
join=left from facts; count non-null version_id per fact
O1 count=1; O2 count=0
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: O1/1 and O2/0.
Why this result follows: Counting a non-NULL version key distinguishes a missing match from the preserved placeholder.
16. Count star trap
Problem: What does COUNT(*) report for one unmatched left-joined fact?
- The left join creates a placeholder result row for O2.
- COUNT(*) counts that row even though its version key is NULL.
fact=O2; dimension matches=0
left join emits one NULL-extended row
count=COUNT(*)
1 joined row, not one dimension match
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: COUNT(*)=1; actual version matches=0.
Why this result follows: A preserved outer row is not itself a real dimension match. This follows the stated synthetic validity rule.
17. Corrected history
Problem: Which facts need review after a historical region boundary is corrected?
- The changed boundary alters the classification between February 1 and February 3.
- O2 falls in that range; O1 and O3 lie outside it.
C1 boundary changed from Feb 1 to Feb 3
facts: O1 Jan 31; O2 Feb 2; O3 Feb 4
O2 is in the affected interval.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: Recompute or version the result for O2 under policy.
Why this result follows: A correction’s entity and effective-time range define the impacted facts. This follows the stated synthetic validity rule.
18. Dimension arrives late
Problem: What should happen when a fact arrives before its required history version?
- The first lookup has no available covering version.
- The stated policy retains the fact until the later dimension evidence is accepted.
fact=O13,C1,Jan 15 arrives first
dimension version covering Jan 15 arrives later
policy: hold unmatched until repaired
Hold O13, then reprocess after version acceptance.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: O13 is not silently discarded.
Why this result follows: A late dimension requires an explicit unmatched and replay path. This follows the stated synthetic validity rule.
19. Two clocks
Problem: What extra question remains if historical truth is corrected after publication?
- Business validity describes when the region applied in the real-world model.
- The learned or publication time describes when the warehouse recorded the correction.
business valid date=Jan 15
warehouse learned correction=Mar 1
report requests: original view and corrected view
Track both validity and knowledge/publication context.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: One validity date alone cannot answer both report questions.
Why this result follows: Distinct business and observation clocks support different historical interpretations. This follows the stated synthetic validity rule.
20. Count hides substitution
Problem: Can enriched output count match while one fact is missing and another duplicated?
- Both lists contain two rows, so a count comparison passes.
- The identity comparison shows that O2 is absent and O1 occurs twice.
source facts=[O1,O2]
output rows=[O1,O1]
source count=2; output count=2
Yes; O2 is missing and O1 is duplicated.
Synthetic temporal-join trace; results are reasoned and no database was accessed.
Expected result: Reconcile fact keys and multiplicity.
Why this result follows: Equal aggregate counts do not prove one output row per source fact.
Common errors and fixes
An order on the boundary matches two dimension rows.
- Why it happens
- Both interval endpoints were treated as inclusive.
- How to fix it
- Apply the agreed half-open comparison consistently.
- Prevent it next time
- Test boundary dates and overlaps.
A late order receives the current customer region.
- Why it happens
- Ingestion time was substituted for business event time.
- How to fix it
- Join using the clock required by the reporting contract.
- Prevent it next time
- Document clocks and test delayed arrivals.
An unmatched fact disappears from the report.
- Why it happens
- An inner join silently excluded a gap in dimension history.
- How to fix it
- Capture and reconcile unmatched facts.
- Prevent it next time
- Monitor validity coverage and rejection counts.
20 practice exercises
1. Which region matches O7 on 2026-02-01 in the fixture?
Show hint
Test the boundary against each half-open interval.
Show worked solution
South. The north interval excludes its end date and the south interval includes its start date. The answer depends on the stated half-open convention; a different business contract would need its own explicit boundaries.
North excludes February 1 as valid_to, while south includes February 1 as valid_from, so O7 matches south exactly once. This conclusion follows the stated convention and requires a separate rule for an open-ended version.
Check your solution
- Exclude February 1 from north.
- Include February 1 in south.
2. A fact matches two dimension versions. Is selecting the latest row automatically correct?
Show hint
Treat two matches as evidence of an overlap or missing rule.
Show worked solution
No. Two matches signal overlapping validity or an incomplete rule. Preserve the fact and both candidates, identify the authoritative history and correct or explicitly resolve the overlap before publishing the aggregate.
Two candidate versions mean the one-match expectation failed. Preserve the fact and both candidates, identify the authoritative history and resolve or explicitly accept the overlap before publishing; the latest loaded row is not automatically correct.
Check your solution
- Record the fact and both candidates.
- Resolve the validity rule before aggregation.
3. A version is valid [Jan 1, Feb 1). Does a fact dated Jan 31 match it?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
Yes. January 31 is on or after the inclusive January 1 start and before the exclusive February 1 end. It matches that version if the entity key also matches. Test the exact end separately rather than assuming both endpoints are included.
Check your solution
- Jan 31 is inside the interval
- Entity key must also match
4. Versions are [Jan 1, Feb 1) north and [Feb 1, Mar 1) south. Which matches Feb 1?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
South matches because it includes its February 1 start; north excludes the same date as its end. The half-open rule gives one match at the shared boundary. An inclusive-end predicate on both versions would create an overlap and duplicate the fact.
Check your solution
- South includes Feb 1
- North excludes its end
5. A fact dated Mar 1 follows a version ending Mar 1 exclusively and no later version exists. What is its status?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
It has zero matching versions because equality with the exclusive end is not inside the interval and no successor is declared. Preserve the fact as unmatched, identify its key and date, and apply the owner’s gap or missing-history policy before publication.
Check your solution
- Exclusive end does not match
- Retain the unmatched fact
6. A fact for customer C2 is dated inside C1’s interval, but no C2 history exists. Explain the result.
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
The date alone is insufficient: a temporal join also requires the dimension entity key to match. C1’s interval cannot supply C2’s region, so the fact has zero matches. Preserve and investigate the missing customer history under the declared policy.
Check your solution
- Customer key differs
- C2 fact remains unmatched
7. North is valid [Jan 1, Feb 10) and south [Feb 1, Mar 1). How many matches does Feb 5 produce?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
February 5 lies in both intervals, so a C1 fact on that date has two candidate versions. Flag the overlap and preserve the fact and both candidates for an authorized resolution. Arbitrarily choosing the latest loaded row hides the history defect.
Check your solution
- Two versions match
- Investigate the overlap
8. North ends Feb 1 exclusively and south starts Feb 2. What happens to a Feb 1 fact?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
Neither version covers February 1: north excludes its end and south has not begun. The fact has zero matches and should be retained for a gap or missing-history decision. Do not silently assign the current region without an authorized rule.
Check your solution
- February 1 is a gap
- Retain the unmatched fact
9. A current dimension version has NULL valid_to meaning unbounded. What must the join predicate handle?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
It must explicitly treat the NULL end as unbounded while still requiring the fact time to be at or after valid_from. A plain event_time < NULL is unknown in SQL and does not match. Document the representation and test an event after the start.
Check your solution
- Handle NULL end explicitly
- Still enforce valid_from
10. An order occurred Jan 20 but arrived Feb 10; north was valid in January and south in February. Which region for order-time reporting?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
Use north because the business contract chooses the order event date, January 20. Preserve the February arrival timestamp as separate lineage so lateness is visible. Joining to the February current region would answer a different current-state question.
Check your solution
- Order-time region is north
- Arrival time remains separate
11. One 15-unit fact matches two overlapping versions. What naive joined sum results?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
The join emits two rows, each repeating the fact’s 15-unit measure, so a naive sum is 30. The original fact amount remains 15. Flag and resolve the overlap before aggregation rather than treating the multiplied total as a new business fact.
Check your solution
- Naive sum is 30
- Original fact amount is 15
12. Two distinct facts each have amount 10. Why is SUM(DISTINCT amount) unsafe as an overlap repair?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
The two facts legitimately total 20 because their identities differ. SUM(DISTINCT amount) returns only 10 by collapsing equal values, undercounting the business measure. Resolve temporal multiplicity by fact and version identity instead of deduplicating amounts.
Check your solution
- True fact sum is 20
- Distinct-value sum is 10
13. A left join preserves an unmatched fact. Compare COUNT(*) and COUNT(version_id) for it.
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
The left join produces one NULL-extended row, so COUNT(*) is 1. The dimension version id is NULL, so COUNT(version_id) is 0. Count a non-NULL dimension key per fact to detect actual temporal matches, including zero and multiple cases.
Check your solution
- COUNT(*) is 1
- COUNT(version_id) is 0
14. A source has facts O1 and O2; enriched output contains O1 twice. Both counts are two. What is wrong?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
O2 is missing and O1 is duplicated despite matching total counts. Compare fact identities and match multiplicity, then investigate missing history or overlapping versions. Hold publication under a one-output-per-fact rule until the owner resolves or accepts the discrepancy.
Check your solution
- O2 is missing
- O1 is duplicated
15. A late dimension version arrives after its January fact was quarantined. What should a repair workflow do?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
Validate and accept the dimension version, then reprocess the retained fact using its event date and documented temporal rule. Record the new output version and lineage so consumers can distinguish the corrected result. Do not silently discard the original unmatched evidence.
Check your solution
- Reprocess the retained fact
- Record corrected output lineage
16. A customer’s effective boundary changes from Feb 1 to Feb 3. Which dates require fact review?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
Facts for that customer in the affected interval from February 1 inclusive to February 3 exclusive may change their matched version. Identify those fact keys and recompute or publish corrections under policy. Facts outside the changed range still need ordinary validation but are not automatically reclassified by this boundary shift.
Check your solution
- Review [Feb 1, Feb 3)
- Scope to the affected customer
17. A dimension correction is learned in March but valid for January. Why record both times?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
The January validity time describes when the business fact applied, while the March observation or publication time describes when the warehouse learned it. Consumers may ask for the original report or the corrected historical view. One clock alone cannot express both questions.
Check your solution
- Business validity is January
- Correction was learned in March
18. A fact has two matching versions. Why is choosing the most recently loaded row not automatically correct?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
The overlap indicates ambiguous or invalid history unless the contract explicitly defines an authoritative tie rule. Load time does not necessarily equal business validity. Preserve the fact and both candidates, then have the owner correct or resolve the history before publishing an aggregate.
Check your solution
- Two matches indicate ambiguity
- Load time is not validity time
19. A timestamp fact has an offset but dimension boundaries are local dates. What must be specified before joining?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
Define the business timezone and conversion from the fact instant to the relevant local date, including daylight-saving rules. Then apply the documented interval convention and precision. Comparing raw representations without that contract can assign a boundary fact to the wrong version.
Check your solution
- Specify business timezone
- Test conversion and boundary
20. A dimension is edited while a long fact-enrichment run is paging. What consistency evidence is needed?
Show hint
Trace entity key, business clock, interval boundaries and match count.
Show worked solution
Use a consistent dimension snapshot or a documented source version for the run so different pages do not silently see incompatible histories. Record that version with output lineage and validate unmatched and multiple matches. Test the actual engine’s snapshot behavior in an isolated environment.
Check your solution
- Pin a dimension version or snapshot
- Record lineage and reconcile matches
Key takeaways
- Choose the business clock and interval boundaries explicitly.
- Reconcile missing and multiple matches before publishing historical facts.
- The business clock determines which historical question the join answers.
- Zero or multiple version matches require explicit handling.
- Equal counts or DISTINCT amounts do not repair temporal join errors.