Skip to content
Preptima
hardDesignScenarioMidSeniorStaff

Events for a daily revenue table arrive up to three days late. How do you design the pipeline and the backfill?

Land raw events unchanged by arrival date, then rebuild each revenue day from that raw layer by event date. Each run overwrites only the days its new arrivals touched, a day is provisional until the three-day window closes, and the backfill is the same job run over a date range, never a separate script.

4 min readUpdated 2026-10-10

Answer

Short answer

Keep two layers. Raw events are appended unchanged, partitioned by the date they arrived, with both timestamps. The revenue table is partitioned by event date and rebuilt from the raw layer. Each run finds which event dates the new arrivals touched, within the three-day bound, and overwrites only those days. Late-arriving data therefore causes a clean recompute, not a patch. The backfill is the same job called with a list of dates.

Was this answer helpful?

Likely follow-ups

  • An event arrives eleven days late for a day finance has already closed. Walk me through what happens to it.
  • How do you stop the nightly run and a backfill from overwriting the same revenue day at once?
  • Refunds arrive as separate events, sometimes weeks after the sale. Which day do they belong to?
  • How would you notice that the three-day bound had quietly become five?

Related questions