# Ghosts of Snapshots Past

> The past keeps rewriting itself.

Canonical URL: <https://datadriven.io/problems/ghosts_of_snapshots_past>

Domain: AI Coding · Difficulty: easy · Seniority: L4

## Problem

Yesterday a bad backfill wrote 2M corrupt rows into events_iceberg. We rolled back to the prior snapshot. Now an analyst's AS OF (timestamp) query for a window two days before the rollback is also returning the corrupt rows. Reproduce by running tests/test_time_travel.py. The bug is in how our reader resolves a snapshot for a timestamp; fix it so AS OF queries reflect what was visible at that time.

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/ghosts_of_snapshots_past)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). DataDriven is the data engineering interview community. Live code execution in SQL, Python, and Spark sandboxes. Every feature is open to every member.