You need weather data for a model that uses only the last 30 days. To avoid storing unnecessary data and minimize cost, how should you design the BigQuery table?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a BigQuery table partitioned by datetime value of the weather date. Set up partition expiration to 30 days..
Why this is the answer
The correct answer leverages BigQuery's native partition expiration feature, which automatically deletes partitions older than a specified duration, directly addressing the need to minimize storage and cost. Partitioning by the datetime value of the weather date ensures that entire partitions containing old weather data are removed efficiently. Incorrect options: Deleting rows with a scheduled query is less efficient and more costly than partition expiration because it involves rewriting data within existing partitions, incurring DML (Data Manipulation Language) charges and potentially affecting query performance. Partitioning by ingestion time would remove data based on when it was loaded, not when the weather event occurred, which might not align with the model's requirement for the "last 30 days" of weather data. Similar to the first incorrect option, running a scheduled query to delete rows based on a datetime column is inefficient and more expensive than using partition expiration.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed