Courseiva
Serving and Scaling Models →mediumMultiple Choice

PMLE Serving and Scaling Models Practice Question

You need to run batch predictions on 10 TB of text data stored in BigQuery using a custom container model hosted in Vertex AI. What is the most cost-effective and simple approach?

⚠ Common exam trap

The exam often tests the misconception that you must export data from BigQuery to GCS before running batch predictions, when in fact Vertex AI batch prediction can directly read from and write to BigQuery, making the export step unnecessary and cost-inefficient.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use Vertex AI batch prediction with BigQuery source and sink.

Vertex AI batch prediction natively supports BigQuery as both source and sink, allowing you to run predictions on 10 TB of text data without any data movement or intermediate storage. This is the most cost-effective and simple approach because it eliminates the need for exporting data, managing infrastructure, or calling online endpoints, and it leverages Vertex AI's optimized batch inference infrastructure that scales automatically.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Use Vertex AI batch prediction with BigQuery source and sink.

    Why this is correct

    Vertex AI batch prediction natively reads from and writes to BigQuery, avoiding data export and re-import. This directly satisfies the cost-effective and simple constraint for 10 TB of text, since no intermediate Cloud Storage staging or custom extraction code is needed.

  • ✗

    Use Cloud Run jobs to read from BigQuery and write results back.

    Why it's wrong here

    Cloud Run jobs lack native BigQuery batch-prediction integration, so you would hand-code reading 10 TB and calling the model, with no managed sharding. Cloud Run suits containerised request-driven workloads; Vertex AI batch prediction handles BigQuery input and output directly.

  • ✗

    Export BigQuery data to GCS, then run a Dataflow pipeline to call the model's online prediction endpoint for each row.

    Why it's wrong here

    Dataflow calling the online endpoint per row incurs per-request online prediction charges across 10 TB, and exporting to GCS adds staging cost. Online endpoints suit low-latency interactive serving; Vertex AI batch prediction reads BigQuery directly and writes results without that pipeline.

  • ✗

    Use Cloud Dataproc to spin up a Spark cluster and run the model inference in parallel.

    Why it's wrong here

    Dataproc requires provisioning and tuning a Spark cluster, and inference runs on cluster VMs rather than Vertex AI's managed batch service, duplicating cost and effort. Dataproc fits existing Spark/Hadoop workloads; Vertex AI batch prediction with a custom container is the managed path here.

About these practice questions

One of 775 original PMLE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

4 more ways this is tested on PMLE

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. An ML engineer needs to run batch predictions on 10 TB of data stored in BigQuery using a TensorFlow model. The predictions must be written to BigQuery. Which service should they use?

medium
  • A.Create a Dataflow pipeline to read from BigQuery, run the model using Python, and write results to BigQuery.
  • B.Export BigQuery data to GCS, run batch prediction on GCS, then load results back to BigQuery.
  • C.Use Vertex AI online prediction with batch requests.
  • ✓ D.Use Vertex AI Batch Prediction with BigQuery source and sink.

Why D: Vertex AI Batch Prediction natively supports BigQuery as both input source and output sink, so the engineer can submit a batch job directly against the BigQuery table and have predictions written back to BigQuery without any data movement code. This is the most efficient and least error-prone option for 10 TB of data.

Variation 2. A machine learning engineer needs to run batch predictions on 50 TB of data stored in BigQuery using a Vertex AI model. The model is a custom container. What is the most efficient way to set up the batch prediction job?

easy
  • ✓ A.Create a Vertex AI batch prediction job with BigQuery source and BigQuery destination.
  • B.Use Dataflow to process the data and call the model via Vertex AI online prediction.
  • C.Export BigQuery data to CSV in GCS, then create a batch prediction job with GCS source.
  • D.Create a Cloud Function to iterate over BigQuery rows and call the endpoint.

Why A: Vertex AI batch prediction natively supports BigQuery as both input source and output destination, allowing the service to read the 50 TB directly from BigQuery and write predictions back without exporting data. This avoids data movement, leverages BigQuery's scalability, and is the most efficient, fully managed approach for large-scale batch inference with a custom container.

Variation 3. A company needs to run batch predictions on 10 TB of data stored in Cloud Storage. The predictions should be written to BigQuery. Which approach should they use?

medium
  • A.Export the model to Cloud Functions and trigger on file upload
  • ✓ B.Create a Vertex AI Batch Prediction job with GCS input and BigQuery output
  • C.Use Vertex AI Online Prediction with a batch job
  • D.Use Dataflow to read from GCS and write to BigQuery, calling the model for each record

Why B: Vertex AI Batch Prediction natively supports reading input from Cloud Storage and writing predictions directly to BigQuery, making it the most efficient and fully managed solution for large-scale batch inference on 10 TB of data. This approach avoids the complexity of custom infrastructure or per-record model calls, leveraging Vertex AI's optimized batch processing pipeline.

Variation 4. Which TWO of the following can be used as input sources for Vertex AI batch prediction jobs? (Choose 2)

easy
  • A.Cloud Firestore
  • B.Cloud SQL
  • ✓ C.BigQuery
  • D.Cloud Spanner
  • ✓ E.Cloud Storage

Why C: Option C (BigQuery) is correct because Vertex AI batch prediction jobs natively accept a BigQuery table as the input source, specified via the bigQuerySource field in the BatchPredictionJob, allowing you to run predictions directly against tabular data stored in BigQuery. Option E (Cloud Storage) is correct because Vertex AI batch prediction jobs also accept input files (such as JSONL, CSV, or TFRecord) stored in a Cloud Storage bucket, specified via the gcsSource field with a URI like gs://bucket/file.jsonl. Options A (Cloud Firestore), B (Cloud SQL), and D (Cloud Spanner) are not valid input sources for Vertex AI batch prediction; these are operational databases that are not directly supported as batch prediction inputs, so you would need to export their data to BigQuery or Cloud Storage first.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.