professional-cloud-data-engineer
Prepare and test your skills
Prepare and test your skills
A left-to-right process flow showing the three Cloud Storage deletion phases: soft delete keeps deleted objects recoverable during a default 7-day window, logical deletion removes index pointers and overwrites raw data, and cryptographic erasure destroys encryption keys so the data becomes permanently unrecoverable. A dashed restore arrow shows that recovery is only possible during the soft delete window.
Applying Bucket Lock to a Google Cloud Storage (GCS) retention policy makes the policy irreversible, allowing users to increase the retention duration but preventing anyone from decreasing the duration or removing the policy until all stored objects expire. The locked retention policy cannot be shortened or deleted until the bucket is completely empty and removed. In addition, individual object holds can still be applied to block deletion regardless of general retention timers.
BigQuery automatically transitions a table or partition to long-term storage once it remains unedited for 90 consecutive calendar days, lowering the base storage rate by 50 percent with no impact on query speed, durability, or availability. Any write, update, or append operation made to that table or partition immediately resets the 90-day timer back to zero.
Data deletion in Google Cloud Storage (GCS) begins with soft delete, which keeps deleted files in an inactive state for a configurable recovery window that defaults to seven days. Next, logical deletion removes active pointer references from the index and purges raw data through scheduled overwriting. Finally, cryptographic erasure destroys the underlying encryption keys needed to read the data, rendering the stored blocks permanently unrecoverable.
Standard Storage provides the highest capacity cost with zero retrieval fees and no minimum duration, whereas Nearline Storage lowers capacity costs with low retrieval fees and a 30-day minimum duration. Coldline Storage further reduces capacity costs while requiring a 90-day minimum duration and higher retrieval fees, and Archive Storage provides the lowest capacity cost alongside the highest retrieval fees and a 365-day minimum duration.
Object Lifecycle Management (OLM) in Google Cloud Storage (GCS) is an automated rule engine that transitions objects between storage classes or deletes them based on user-defined criteria. Bucket administrators configure these rules using the Google Cloud console, the gcloud command-line interface, or client libraries. As objects reach specified age thresholds or match prefix criteria, OLM moves data from active tiers like Standard Storage to colder classes such as Nearline Storage or Coldline Storage. This automated progression optimizes storage costs across the data lifecycle without requiring custom application code or manual operations.
Retention policies enforce data governance by guaranteeing that objects in a bucket remain protected from deletion or modification for a specified duration. To prevent administrative tampering or accidental configuration changes, administrators use Bucket Lock to make the retention policy irreversible. Once Bucket Lock is active, users can increase the retention duration, but no one can decrease the duration or remove the policy until all stored objects expire.
Individual objects can also be protected using object holds, which block deletion regardless of general retention timers:
Exam tip: Once Bucket Lock is applied to a retention policy, the retention period can only be increased; the policy cannot be shortened or removed until the bucket is completely empty and deleted.
Cloud Storage handles data disposal through an ordered multi-stage lifecycle that protects against accidental loss while ensuring complete, irreversible destruction when required. The deletion pipeline moves data through distinct recovery and purge phases:
For managing large data estates, Storage batch operations run serverless tasks capable of modifying up to one billion objects within three hours. These jobs can alter object holds, rewrite metadata, change encryption keys, or delete datasets across millions of files using manifest lists or prefix filters. Additionally, object versioning retains prior versions of modified objects, allowing administrators to define targeted expiration rules for noncurrent file versions.
BigQuery manages analytical storage costs through configurable billing models and automated long-term storage price reductions. Datasets can be configured for either logical storage billing or physical storage billing, allowing organizations to align charges with their query architecture.
| Storage Billing Model | Measurement Basis | Retention and Feature Costs |
|---|---|---|
| Logical storage | Uncompressed data bytes | Standard table storage without separate retention charges |
| Physical storage | Compressed data bytes on disk | Separate charges apply for storage features such as time travel |
BigQuery automatically promotes data into long-term storage when a table or partition remains unedited for 90 consecutive calendar days. Once data transitions to long-term storage, the base storage rate drops by 50 percent automatically. This cost discount occurs with no degradation in query speed, availability, or durability, though any write, update, or append immediately resets the 90-day timer back to zero.
Exam tip: Any update or modification to a BigQuery table or partition resets the 90-day timer required to qualify for the 50 percent long-term storage discount.
Expiration settings in BigQuery provide an automated hierarchy for deleting obsolete analytical records across datasets, tables, and individual partitions. Lifecycle management applies across three container levels:
Partition expiration evaluates age relative to the UTC partition boundary and drops individual partitions as they expire without deleting the surrounding table structure. To minimize retention overhead under physical storage billing, administrators can reduce the historical time travel window below the standard seven-day default.
Multi-storage tiering balances storage cost against retrieval expenses and operational latency by placing data in the class that matches its access frequency. Cloud Storage provides distinct storage classes to accommodate varying access patterns:
| Storage Class | Target Access Pattern | Retrieval Cost and Latency Tradeoff |
|---|---|---|
| Standard | Frequently accessed hot data | Highest capacity cost, zero retrieval fees, and millisecond latency |
| Nearline | Infrequently accessed data (e.g., accessed once a month) | Lower capacity cost, low retrieval fees, and 30-day minimum duration |
| Coldline | Rarely accessed data (e.g., accessed once a quarter) | Lower capacity cost, higher retrieval fees, and 90-day minimum duration |
| Archive | Cold archival and compliance (e.g., accessed once a year) | Lowest capacity cost, highest retrieval fees, and 365-day minimum duration |
Exam tip: Archival storage classes offer the lowest monthly capacity costs, but high retrieval fees make them cost-prohibitive for data subjected to unexpected or frequent query access.
Effective cloud data architectures separate the persistent storage layer from the data computation layer to optimize costs and performance. Data pipelines store raw files in Cloud Storage buckets while running analytical compute workloads inside Cloud Dataflow or Cloud Dataproc. Colocating compute clusters in the same geographical region as the storage buckets prevents inter-region network charges and lowers processing latency. Lifecycle rules manage objects automatically by monitoring object age and metadata, while monitoring tools like Cloud Monitoring track access trends and storage class distributions to ensure policies remain aligned with evolving business needs.
A lead data engineer is designing a data lifecycle and cost-optimization architecture for an enterprise BigQuery data warehouse. The requirements are:
telemetry_events dataset must automatically delete individual daily partitions once they are older than 60 days, while retaining the base table structure for ongoing streaming ingestion.Which configuration should the data engineer implement?