
Answer-first summary for fast verification
Answer: Make the tables time-partitioned, and configure the partition expiration at 45 days
The correct answer is B. Making the tables time-partitioned and configuring the partition expiration at 45 days is the best practice recommended by Google. This approach ensures that only the data in the partitions older than 45 days will be deleted, optimizing storage and maintaining table integrity. Setting the expiration at the table level (option A) would delete the entire table and not just the old records. Option C, relying on BigQuery's default behavior, does not automatically prune logs older than 45 days. Option D involves extra manual work and is not the most efficient or automated solution.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are responsible for managing multiple applications that generate logs which need to be analyzed using BigQuery. Each application should have its own table, and logs older than 45 days should be automatically removed to optimize storage. Following Google-recommended practices, what should you do?
A
Configure the expiration time for your tables at 45 days
B
Make the tables time-partitioned, and configure the partition expiration at 45 days
C
Rely on BigQuery's default behavior to prune application logs older than 45 days
D
Create a script that uses the BigQuery command line tool (bq) to remove records older than 45 days