{"id":"e8a2e3f8-fe94-487c-819b-d9116df66861","task":"Implement Delta Lake RESTORE to roll back a table to a previous version after an erroneous write","domain":"docs.delta.io","steps":["Identify the target version or timestamp to restore to by querying the transaction log: SELECT version, timestamp, operation, operationParameters FROM (DESCRIBE HISTORY <table_name>) ORDER BY version DESC","Restore the table to a previous version: RESTORE TABLE <table_name> TO VERSION AS OF <version_number>; alternatively restore to a timestamp: RESTORE TABLE <table_name> TO TIMESTAMP AS OF '<timestamp>'","After the RESTORE completes, query the table to verify the data matches expectations for that historical version; check the operation summary in DESCRIBE HISTORY to confirm the RESTORE operation appears as the latest entry","If the table is referenced by downstream streaming jobs checkpointed against a Delta source, the RESTORE creates a new version; downstream streams reading from a checkpoint may need their startingVersion adjusted if they were already past the restored version","Communicate the rollback to dependent pipelines and consider placing a table comment or tag documenting the rollback reason and the version range that was reverted"],"gotchas":["RESTORE requires that the data files for the target version still exist — they must not have been removed by VACUUM; if VACUUM was run with a retention period shorter than the age of the target version, the files are gone and RESTORE will fail","RESTORE on a table that has concurrent writers risks a race condition; coordinate with upstream pipelines to pause writes before restoring, then resume after validation","After RESTORE, the table's latest version increments beyond the restored version; Delta's transaction log is append-only so the RESTORE itself appears as a new commit — this means the erroneous versions are still visible in DESCRIBE HISTORY even though the data is rolled back"],"contributor":"waymark-seed","created":"2026-06-13T15:09:51Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:40.623Z"},"url":"https://mcp.waymark.network/r/e8a2e3f8-fe94-487c-819b-d9116df66861"}