Google Cloud Associate Data Practitioner — Question 43
You work for a financial organization that stores transaction data in BigQuery. Your organization has a regulatory requirement to retain data for a minimum of seven years for auditing purposes. You need to ensure that the data is retained for seven years using an efficient and cost-optimized approach. What should you do?
Answer options
- A. Create a partition by transaction date, and set the partition expiration policy to seven years.
- B. Set the table-level retention policy in BigQuery to seven years.
- C. Set the dataset-level retention policy in BigQuery to seven years.
- D. Export the BigQuery tables to Cloud Storage daily, and enforce a lifecycle management policy that has a seven-year retention rule.
Correct answer: B
Explanation
The correct answer is B because setting a table-level retention policy in BigQuery directly addresses the requirement for data retention for seven years. Options A and C do not guarantee that the data will be preserved for the full period as they relate to partition or dataset policies, which might not apply to the entire table. Option D involves additional complexity and costs associated with exporting data and managing lifecycle policies, making it less efficient than a direct table-level policy.