Professional Data EngineerEnsuring solution qualityHard

A financial institution is building a data lake on Google Cloud using Cloud Storage and BigQuery. They need to implement strict data retention policies for different types of data (e.g., transaction logs for 7 years, audit trails for 10 years, temporary processing files for 30 days). You need to automate the enforcement of these retention policies in Cloud Storage to ensure compliance and optimize costs. Which Cloud Storage feature should you use?

  1. ALifecycle Management.
  2. BObject Versioning.
  3. CAccess Control Lists (ACLs).
  4. DRequester Pays.
Show answer & explanation

Correct answer: A. Lifecycle Management.

Cloud Storage Lifecycle Management allows you to define rules to automatically transition objects to colder storage classes or delete them after a specified period or condition. This directly addresses the need to automate data retention policies for different data types, ensuring compliance and optimizing storage costs.

Why the other options are wrong

  • B. Object Versioning keeps multiple versions of an object, protecting against accidental deletion or modification, but it does not automatically enforce retention periods or delete old versions.
  • C. Access Control Lists (ACLs) manage who can access objects, not how long they are retained or when they are deleted.
  • D. Requester Pays shifts the cost of accessing data from the bucket owner to the requester, which is unrelated to data retention policies.

Cloud Storage Lifecycle Management

A Google Cloud Storage feature that automates actions on objects (like deletion or class transition) based on defined rules and conditions.

  • Automates data retention and deletion.
  • Transitions objects to different storage classes.
  • Optimizes storage costs and ensures compliance.

Memory trick: Cloud Storage Lifecycle Management is like a timed sprinkler system for your data: it automatically moves or deletes files when they're 'ripe' or 'expired'.

More Ensuring solution quality questions