Explain the concept of BigQuery's time travel feature and how it can be used for data recovery.

Quick Overview

Asks how BigQuery time travel lets you read a table as it was in the recent past and how to use it after a bad DELETE, a bad UPDATE or a dropped table. Tests knowledge of the retention window, fail-safe, and longer-term options such as table snapshots.

Explain the concept of BigQuery's time travel feature and how it can be used for data recovery.

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

Explain the concept of BigQuery's time travel feature and how it can be used for data recovery. For example, an hour ago someone ran a `DELETE` with the wrong filter on a production table, and the next day another table in the same dataset was dropped by mistake. ```hint Where the history lives Think about how long BigQuery keeps earlier versions of a table, who can read them, and what happens after that period ends. ``` ```hint Restore without losing new writes Rebuilding the whole table from a past timestamp also erases every valid change made since then. Consider a narrower restore. ``` ### What a Strong Answer Covers - Explains what time travel is and how long the history is kept. - Shows the SQL for reading a past state and at least one way to restore data from it. - Treats a bad `UPDATE` or `DELETE` and a dropped table as separate recovery cases. - Covers the limits: the window, fail-safe, and what to use when you need history for longer. ### Follow-up Questions - The bad `DELETE` ran 9 days ago. What options do you have? - How do you find the exact time the bad statement ran, so you can choose the timestamp to restore from? - What does a longer time travel window cost, and when would you shorten it? - How do table snapshots and table clones differ from time travel?

Overview: Asks how BigQuery time travel lets you read a table as it was in the recent past and how to use it after a bad DELETE, a bad UPDATE or a dropped table. Tests knowledge of the retention window, fail-safe, and longer-term options such as table snapshots.

PracHub logo
General
Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

Explain the concept of BigQuery's time travel feature and how it can be used for data recovery.

For example, an hour ago someone ran a DELETE with the wrong filter on a production table, and the next day another table in the same dataset was dropped by mistake.

What a Strong Answer Covers Guidance

  • Explains what time travel is and how long the history is kept.
  • Shows the SQL for reading a past state and at least one way to restore data from it.
  • Treats a bad UPDATE or DELETE and a dropped table as separate recovery cases.
  • Covers the limits: the window, fail-safe, and what to use when you need history for longer.

Follow-up Questions Guidance

  • The bad DELETE ran 9 days ago. What options do you have?
  • How do you find the exact time the bad statement ran, so you can choose the timestamp to restore from?
  • What does a longer time travel window cost, and when would you shorten it?
  • How do table snapshots and table clones differ from time travel?