nerdexam
Google

PROFESSIONAL-CLOUD-DEVELOPER · Question #366

Your team runs a Python job that reads millions of customer record files stored in a Cloud Storage bucket. To comply with regulatory requirements, you need to ensure that customer data is immediately

The correct answer is A. Add a final step in the job that deletes all the objects in the bucket in bulk by using batch. The goal is immediate deletion after job completion while minimizing time. Option A uses the Cloud Storage batch API, which bundles multiple delete requests into a single HTTP call, making it the fastest bulk-deletion method. Option B (Object Lifecycle Management) is incorrect be

Storing data

Question

Your team runs a Python job that reads millions of customer record files stored in a Cloud Storage bucket. To comply with regulatory requirements, you need to ensure that customer data is immediately deleted once the job is completed. You want to minimize the time required to complete this task. What should you do?

Options

  • AAdd a final step in the job that deletes all the objects in the bucket in bulk by using batch
  • BConfigure Object Lifecycle Management on the Cloud Storage bucket that deletes all the objects
  • CRemove the bucket from the Google Cloud console when the job is completed
  • DUse the gcloud CLI to execute the gcloud storage rm --recursive gs://BUCKET_NAME/ command.

How the community answered

(41 responses)
  • A
    80% (33)
  • B
    12% (5)
  • C
    5% (2)
  • D
    2% (1)

Explanation

The goal is immediate deletion after job completion while minimizing time. Option A uses the Cloud Storage batch API, which bundles multiple delete requests into a single HTTP call, making it the fastest bulk-deletion method. Option B (Object Lifecycle Management) is incorrect because lifecycle rules are evaluated once per day - deletion is not immediate. Option C deletes the entire bucket including its configuration, which is likely undesirable and irreversible. Option D (gcloud storage rm --recursive) issues individual delete requests sequentially, which is significantly slower than a batch API call for millions of objects.

Topics

#Cloud Storage#Data Deletion#Batch Operations#Performance Optimization

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-CLOUD-DEVELOPER Practice