Google Professional Data Engineer Question 135
Single answerGoogle Cloud PlatformYou are a data engineer managing a large dataset stored in Cloud Storage. The dataset contains time-series data that grows daily. To reduce storage costs, you want to automatically delete files older than 90 days while ensuring that recent data remains accessible. What is the best approach to implement this in Google Cloud?
- A
Use Cloud Storage Object Lifecycle Management to configure a rule that deletes objects older than 90 days.
- B
Manually review and delete objects older than 90 days every month using the Google Cloud Console.
- C
Implement a Cloud Function that runs periodically to check for and delete objects older than 90 days.
- D
Move older files to a Nearline storage bucket manually every 90 days to reduce costs.
Show answer and explanation
Correct answer: A
Explanation
Cloud Storage Object Lifecycle Management is a built-in feature that automates the management of object lifecycles, such as deletion or storage class transitions, based on object age or creation date. It is the most efficient and scalable solution for managing large datasets with time-based retention requirements.
- A. Correct.
This is the correct approach. Cloud Storage Object Lifecycle Management allows you to define rules to automatically delete or transition objects based on their age, which is ideal for managing time-series data and reducing costs.
- B. Incorrect.
This is a manual and error-prone process that does not scale well for large datasets. It is not an efficient solution for managing data lifecycle.
- C. Incorrect.
While this could work, it requires additional implementation effort, ongoing maintenance, and introduces unnecessary complexity compared to using built-in lifecycle management features.
- D. Incorrect.
Manually moving files to Nearline storage reduces costs for older data, but it does not automate the deletion of files older than 90 days, and it is a labor-intensive approach.