ASSOCIATE-DATA-PRACTITIONER practice question 21 of 25
Your organization uses a BigQuery table that is partitioned by ingestion time. You need to remove data that is older than one year to reduce your organization’s storage costs. You want to use the most efficient approach while minimizing cost. What should you do?
Full set: 106 questionsThe most efficient and cost-effective method to automatically remove old data from a partitioned table is to set the partition expiration. The ALTER TABLE statement with the partitionexpirationdays option configures BigQuery to automatically delete partitions older than the specified period (365 days for one year). This approach requires no ongoing manual intervention or query processing costs. It directly removes the data and its associated storage costs, fulfilling all requirements of the question.
A. This method does not remove data; it only marks it. Storage costs remain, and running periodic UPDATE queries incurs additional processing costs.
B. A view only filters data at query time and does not remove the underlying data from storage, so it fails to reduce storage costs.
C. Requiring a partition filter is a best practice for querying to reduce costs, but it does not remove any data from the table itself.
1. Google Cloud Documentation, "Introduction to partitioned tables", section "Partition expiration". States, "You can control how long BigQuery keeps data in a partition by configuring a partition expiration for a partitioned table... When a partition expires, BigQuery deletes the data in that partition."
2. Google Cloud Documentation, "Modifying table schemas", section "Set partition expiration". Provides the exact ALTER TABLE ... SET OPTIONS(partitionexpirationdays=...) syntax for implementing this solution.
3. Google Cloud Documentation, "Control BigQuery costs", section "Avoid running queries that update data". Recommends using features like partition expiration instead of DML statements to manage data lifecycle to avoid processing costs.
Keep practicing
Take the free ASSOCIATE-DATA-PRACTITIONER practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other ASSOCIATE-DATA-PRACTITIONER practice questions
- Question 1You are designing a pipeline to process data files that arrive in Cloud Storage by 3:00 a…
- Question 2Your organization plans to move their on-premises environment to Google Cloud. Your organ…
- Question 3You are responsible for managing Cloud Storage buckets for a research company. Your compa…
- Question 4You are predicting customer churn for a subscription-based service. You have a 50 PB hist…
- Question 5Your retail company collects customer data from various sources:Online transactions: Stor…
- Question 6Your company has developed a website that allows users to upload and share video files. T…
