A retail company drops daily sales files into a storage bucket. Each new file should kick off the training workflow automatically, with no polling and no human action. What is the best design?
Show answer and explanation
Answer: B
Cloud Storage can emit object-finalize events that route through Eventarc or Pub/Sub to a Cloud Function. The function then submits a pipeline run with the new file's path as a parameter. This is event-driven, so runs happen exactly when data arrives and no compute is wasted waiting. Scheduled scans, manual submission, and button-driven runs all add delay or depend on people.
Why the other options are wrong
- A. A nightly scan wastes compute checking for changes that may not exist, and it delays training by up to a full day after a file lands.
- C. Manual submission depends on a person remembering each morning, so runs are inconsistent and late whenever that person is unavailable.
- D. Button-driven runs require a human action every time, which defeats the goal of automatic retraining whenever fresh data is available.