
Answer-first summary for fast verification
Answer: Create a BigQuery table partitioned by the weather date's datetime value and set partition expiration to 30 days.
The correct answer is **B**. Partitioning the BigQuery table by the weather date's datetime value and setting partition expiration to 30 days ensures that only the relevant data for the last 30 days is retained, optimizing storage costs without manual intervention. This method leverages BigQuery's built-in features for efficient data management. - **A** and **C** involve manual or scheduled deletion processes, which are less efficient and require additional maintenance. - **D** is incorrect because partitioning by ingestion time doesn't align with the requirement to use the last 30 days of weather data, potentially leading to irrelevant data retention.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
As a data engineer for an airline, you're tasked with efficiently storing weather data in BigQuery for a machine learning model that only uses the most recent 30 days of data. What's the best approach to minimize costs and avoid storing unnecessary data?
A
Create a BigQuery table with a datetime column for the weather date. Schedule a query to delete rows older than 30 days.
B
Create a BigQuery table partitioned by the weather date's datetime value and set partition expiration to 30 days.
C
Create a BigQuery table where each record has an ingestion timestamp. Schedule a query to delete rows older than 30 days.
D
Create a BigQuery table partitioned by ingestion time and set partition expiration to 30 days.
No comments yet.