Handling Late-Arriving Facts & Late-Arriving Dimensions
Design loads that tolerate delayed events and incomplete dimensions without corrupting history.
In plain words
Event, ingestion, and process timestamps. Next, unknown dimension rather than guessed truth. Finally, version, reconcile, and notify consumers.
Think of it like…
Late arrival is a delayed receipt for last month's books: file it by the purchase date, use that month's customer address, and issue a correction rather than counting it as today's sale.
Where you’ve seen it
A 10-day-late order is partitioned on order_date, upserted by order_id, and joined to the customer SCD row valid at checkout; the past 14-day revenue aggregate is atomically reprocessed.
Words you’ll hear
- Late Facts
- Business events whose event time predates the closed or already published processing partition.
- Late Dims
- A descriptive entity that becomes known after facts reference its natural key, often represented temporarily by an inferred member.
- Reprocessing
- Rerunning a bounded affected time/key range using idempotent writes after source truth catches up.
- Operational boundary
- Dropping a late event loses revenue, assigning it today's customer attributes rewrites history incorrectly, and blindly rewriting a closed month can duplicate totals or invalidate published exports. Maintain event-time partitions plus processing-time watermarks, an inferred/unknown dimension member, a configured lookback window, and idempotent MERGE/recompute logic with versioned corrections to published aggregates.
Visual diagram
Theory & deep dive
Late Facts: the working mechanism
Late data arrives after its business event time, so loads need a replay window and deterministic lookup policy for facts whose dimension version or business partition was not known at initial processing.
Event, ingestion, and process timestamps. Unknown dimension rather than guessed truth, then deterministically recompute affected partitions; this exposes the state governed by Reprocessing.
A 10-day-late order is partitioned on order_date, upserted by order_id, and joined to the customer SCD row valid at checkout; the past 14-day revenue aggregate is atomically reprocessed.
Handling Late-Arriving Facts & Late-Arriving Dimensions: failure mode and production response
Dropping a late event loses revenue, assigning it today's customer attributes rewrites history incorrectly, and blindly rewriting a closed month can duplicate totals or invalidate published exports.
Maintain event-time partitions plus processing-time watermarks, an inferred/unknown dimension member, a configured lookback window, and idempotent MERGE/recompute logic with versioned corrections to published aggregates. Track Lateness p99 as "inform the replay lookback with observed event delay", and make Lookback visible to the dataset owner.
How it works, step by step
Step 1 of 41. Record both times
Event, ingestion, and process timestamps. Late data arrives after its business event time, so loads need a replay window and deterministic lookup policy for facts whose dimension version or business partition was not known at initial processing.
- Lateness p99
- inform the replay lookback with observed event delay
- Late Dims
- A descriptive entity that becomes known after facts reference its natural key, often represented temporarily by an inferred member.
When to use it & trade-offs
What it is
Late data arrives after its business event time, so loads need a replay window and deterministic lookup policy for facts whose dimension version or business partition was not known at initial processing. A 10-day-late order is partitioned on order_date, upserted by order_id, and joined to the customer SCD row valid at checkout; the past 14-day revenue aggregate is atomically reprocessed.
Why it matters: Dropping a late event loses revenue, assigning it today's customer attributes rewrites history incorrectly, and blindly rewriting a closed month can duplicate totals or invalidate published exports. Maintain event-time partitions plus processing-time watermarks, an inferred/unknown dimension member, a configured lookback window, and idempotent MERGE/recompute logic with versioned corrections to published aggregates.
When to reach for it
- Design loads that tolerate delayed events and incomplete dimensions without corrupting history.
- Choose Late Facts because it provides this capability: Business events whose event time predates the closed or already published processing partition.
- Keep evidence for Lateness p99 at "inform the replay lookback with observed event delay" so the last production stage-Publish corrections - version, reconcile, and notify consumers-remains testable.
When to avoid or be careful
- Dropping a late event loses revenue, assigning it today's customer attributes rewrites history incorrectly, and blindly rewriting a closed month can duplicate totals or invalidate published exports.
- Do not conflate Late Dims with Late Facts. The second concept contributes different behavior: A descriptive entity that becomes known after facts reference its natural key, often represented temporarily by an inferred member.
- Release only after this guardrail is in place: Maintain event-time partitions plus processing-time watermarks, an inferred/unknown dimension member, a configured lookback window, and idempotent MERGE/recompute logic with versioned corrections to published aggregates.
Late Facts / Late Dims / Reprocessing - roles, limits, and operating cost
Strengths: Business events whose event time predates the closed or already published processing partition. Late data arrives after its business event time, so loads need a replay window and deterministic lookup policy for facts whose dimension version or business partition was not known at initial processing.
Watch out: Dropping a late event loses revenue, assigning it today's customer attributes rewrites history incorrectly, and blindly rewriting a closed month can duplicate totals or invalidate published exports.
Strengths: A descriptive entity that becomes known after facts reference its natural key, often represented temporarily by an inferred member. In this workflow it supports: Replay window - deterministically recompute affected partitions.
Watch out: The operating cost is real: for example 14 days, not an arbitrary last run.
Strengths: Rerunning a bounded affected time/key range using idempotent writes after source truth catches up. Its output can be checked with Correction version.
Watch out: Operating guardrail: Maintain event-time partitions plus processing-time watermarks, an inferred/unknown dimension member, a configured lookback window, and idempotent MERGE/recompute logic with versioned corrections to published aggregates.
Interview signals & numbers to know
When this topic comes up
- “Where is the failure boundary for Late Facts, and how would Lateness p99 reveal it?”
- “Why is Late Dims distinct from this behavior: rerunning a bounded affected time/key range using idempotent writes after source truth catches up?”
- Production clue: Dropping a late event loses revenue, assigning it today's customer attributes rewrites history incorrectly, and blindly rewriting a closed month can duplicate totals or invalidate published exports.
- Design probe: Maintain event-time partitions plus processing-time watermarks, an inferred/unknown dimension member, a configured lookback window, and idempotent MERGE/recompute logic with versioned corrections to published aggregates.
Benchmarks & rules of thumb
- Lateness p99
- inform the replay lookback with observed event delay
- Lookback
- for example 14 days, not an arbitrary last run
- Correction version
- consumers know which aggregate supersedes a prior publication
Common mistakes & follow-ups
Common interview mistakes
- Dropping a late event loses revenue, assigning it today's customer attributes rewrites history incorrectly, and blindly rewriting a closed month can duplicate totals or invalidate published exports.
- Reporting success from a job exit code without checking Lateness p99 and Lookback.
- Treating this example as complete without replay, rollback, or access boundaries: A 10-day-late order is partitioned on
order_date, upserted byorder_id, and joined to the customer SCD row valid at checkout; the past 14-day revenue aggregate is atomically reprocessed.
Likely interviewer follow-ups
- How would you prove this contract instead of only checking that the command ran: Business events whose event time predates the closed or already published processing partition.
- What does the recovery plan do when this occurs? Dropping a late event loses revenue, assigning it today's customer attributes rewrites history incorrectly, and blindly rewriting a closed month can duplicate totals or invalidate published exports.
- When is Late Facts insufficient for Lookback, and what does adding Late Dims cost in Lateness p99?
Knowledge check
Put it into practice
Practice related interview Q&A
Apply Handling Late-Arriving Facts & Late-Arriving Dimensions with data engineer interview Q&A and hands-on practice.