How to automate weekly batch predictions to BigQuery?
You have recently used TensorFlow to train a classification model on tabular data. You have created a Dataflow pipeline that can transform several terabytes of data into training or prediction datasets consisting of TFRecords. You now need to productionize the model, and you want the predictions to be automatically uploaded to a BigQuery table on a weekly schedule. What should you do?
Community Votes
64% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The exam tests the distinction between online serving and batch processing, where the common trap is unnecessarily deploying a Vertex AI endpoint for a scheduled batch prediction job.
To automate weekly batch predictions for a TensorFlow model, import the model into Vertex AI and orchestrate the workflow using Vertex AI Pipelines with DataflowPythonJobOp and ModelBatchPredictOp. The community consensus confirms that deploying a serving endpoint is unnecessary for batch workloads and that the pipeline components can handle data processing and BigQuery uploads efficiently.
Choosing Option B is a common mistake because users often believe they must deploy an endpoint and manually invoke a Dataflow pipeline to reuse logic, overlooking that DataflowPythonJobOp allows reusing that logic within a managed pipeline without an endpoint.
Community Discussion (16 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option C is the correct approach because it leverages Vertex AI Pipelines to orchestrate the entire workflow on a schedule without the overhead of a managed endpoint. By usingDataflowPythonJobOp, you can reuse your existing data processing logic, and ModelBatchPredictOp allows you to run batch predictions directly on the imported model resource. This component supports specifying a BigQuery destination table for the output, satisfying the requirement to upload predictions automatically.Why the Other Options Are Wrong
Option A is incorrect because deploying the model to a Vertex AI endpoint is designed for online, low-latency inference, not weekly batch jobs, and incurs unnecessary costs. Option B is incorrect because it suggests manually orchestrating a Dataflow pipeline to hit a live endpoint, which is a custom implementation that is less robust than the managedModelBatchPredictOp. Option D is incorrect because importing a TensorFlow model into BigQuery ML and rewriting logic in SQL is inefficient compared to using the existing Dataflow pipeline and Vertex AI infrastructure.Community Comment Notes
Commenters [1], [2], and [6] highlight thatModelBatchPredictOp can automatically upload results to BigQuery and that there is no need to deploy an endpoint for batch predictions. Some users argued for Option B based on the desire to reuse the existing pipeline code, but the community clarified that DataflowPythonJobOp fulfills this requirement within the Vertex AI Pipeline structure. Official Reference
Exam Strategy
When you encounter questions requiring batch or scheduled predictions, immediately eliminate options that involve deploying to an endpoint unless online serving is explicitly required. Look for managed pipeline components like ModelBatchPredictOp that handle infrastructure and output integration automatically.
Related Analysis
Practice All PMLE Questions
Access 65 questions with complete answers and detailed explanations.
View Full PMLE Practice Test →