Google Cloud Associate Data Practitioner — Question 28
You manage a BigQuery table that is used for critical end-of-month reports. The table is updated weekly with new sales data. You want to prevent data loss and reporting issues if the table is accidentally deleted. What should you do?
Answer options
- A. Configure the time travel duration on the table to be exactly seven days. On deletion, re-create the deleted table solely from the time travel data.
- B. Schedule the creation of a new snapshot of the table once a week. On deletion, re-create the deleted table using the snapshot and time travel data.
- C. Create a clone of the table. On deletion, re-create the deleted table by copying the content of the clone.
- D. Create a view of the table. On deletion, re-create the deleted table from the view and time travel data.
Correct answer: B
Explanation
Option B is correct because scheduling a snapshot weekly ensures that you have a recent version of the table to restore from, which combined with time travel data provides an effective backup. Option A is insufficient as it relies solely on time travel, which may not capture all changes if the deletion happens after the last update. Option C may not provide timely recovery since the clone may not be updated as frequently as needed. Option D is not a viable solution as views do not store data; they merely present it, so they cannot be used to restore a deleted table.