A faulty pipeline overwrote a BigQuery table with bad data two hours ago. What is the fastest way to recover the previous data?
- Exam domain
- Maintaining and automating data workloads~18% of the exam
- Difficulty
- Easy
- In this mock
- 12 questions on this domainPractise this domain
Why the exam asks this
Maintaining and automating data workloads: Maintaining awareness of failures and mitigating impact.
Objective in the exam guide: Preparing for data corruption and missing data.
Bad writes happen. The exam checks the built-in recovery.
Why B is the answer
Query the table as of a time before the bad write using time travel and restore it
Time travel lets you access changed or deleted data within the window, seven days by default.
How it works
BigQuery time travel accesses data from any point in the window.
The window is seven days by default and configurable from two to seven.
Fail-safe keeps data for an additional period after that.
Clues in the question
The words that point to the answer, and what each one tells you.
- Two hours ago
- Within the time travel window.
In detail
- The window can be set from two to seven days.
- Fail-safe adds a further period for emergency recovery.
Side by side with look-alikes
| Option | Recovers last good state quickly? |
|---|---|
| Time travel | Yes |
| Monthly CSV | No |
| Ask support | No |
| Rerun all loads | No |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Rerun every historical load from scratchWrong
Rerunning all loads is slow and may not reproduce state.
B. Query the table as of a time before the bad write using time travel and restore itRight
Time travel lets you access changed or deleted data within the window, seven days by default.
C. Restore from a monthly CSV exportWrongMost tempting
A monthly export loses recent data.
Why it tempts: Backups matter. But a monthly export loses weeks of good data.
D. Ask Google Support to rebuild itWrong
Self-service recovery is faster.
In practice
- Add validation before overwriting tables so bad data is caught first.