Courseiva
Serving and Scaling Models →mediumMultiple Choice

PMLE Serving and Scaling Models Practice Question

A company wants to run batch predictions on millions of records stored in BigQuery. They need to preprocess the data (e.g., feature engineering) before feeding it to the model. Which approach is most scalable and cost-effective?

⚠ Common exam trap

A common mistake is assuming a single large cluster (Dataproc) or a single VM is sufficient for batch processing, when in fact serverless, auto-scaling services like Dataflow are more appropriate for large-scale, ephemeral preprocessing tasks.

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

✓

Preprocess with Cloud Dataflow, output to Cloud Storage, then submit a Vertex AI batch prediction job.

The most scalable and cost-effective because Cloud Dataflow (Apache Beam) provides serverless, auto-scaling preprocessing that handles large volumes of data efficiently, and Vertex AI batch predictions natively read from Cloud Storage, avoiding the need to manage infrastructure. This decouples preprocessing from prediction, allowing each to scale independently and minimizing costs by using ephemeral, pay-per-use resources.

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 a large DataProc cluster to preprocess and run batch predictions.

    Why it's wrong here

    A DataProc cluster incurs persistent compute costs for preprocessing and prediction, whereas BigQuery ML or a serverless solution like Vertex AI batch predictions can process data in-place without provisioning a cluster. This approach is tempting because DataProc excels at large-scale distributed data processing and model training, making it a correct choice for iterative workloads requiring custom Spark pipelines.

  • ✗

    Preprocess inline in the batch prediction job using a custom container.

    Why it's wrong here

    A custom container in the batch prediction job runs preprocessing on each prediction node, duplicating work and bypassing BigQuery's distributed SQL engine. It is tempting for custom feature logic, but BigQuery ML with TRANSFORM clauses or Dataflow performs the same engineering serverlessly and at lower cost.

  • ✗

    Use a custom Python script on a Compute Engine instance.

    Why it's wrong here

    A Compute Engine script requires you to provision, scale, and manage instances yourself, so it cannot elastically handle millions of records cost-effectively. It is tempting when custom preprocessing logic is needed, but BigQuery ML or Dataflow with remote model inference handles that at scale.

  • ✓

    Preprocess with Cloud Dataflow, output to Cloud Storage, then submit a Vertex AI batch prediction job.

    Why this is correct

    Cloud Dataflow performs distributed preprocessing at scale, writing engineered features to Cloud Storage, which Vertex AI batch prediction reads directly. This decouples heavy transformation from the prediction job, satisfying the millions-of-records scalability and cost-efficiency constraint better than in-job preprocessing.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

Courseiva writes every PMLE question from scratch — 775 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.