nerdexam
Google

PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #187

You work for a food product company. Your company's historical sales data is stored in BigQuery.You need to use Vertex AI's custom training service to train multiple TensorFlow models that read the da

The correct answer is B. Write SQL queries to transform the data in-place in BigQuery.. To preprocess BigQuery data with min-max scaling and bucketing for TensorFlow training with minimal time, cost, and effort, perform these transformations directly within BigQuery using SQL queries.

Submitted by tyler.j· Apr 18, 2026Data processing and feature engineering

Question

You work for a food product company. Your company's historical sales data is stored in BigQuery.You need to use Vertex AI's custom training service to train multiple TensorFlow models that read the data from BigQuery and predict future sales. You plan to implement a data preprocessing algorithm that performs mm-max scaling and bucketing on a large number of features before you start experimenting with the models. You want to minimize preprocessing time, cost, and development effort. How should you configure this workflow?

Options

  • AWrite the transformations into Spark that uses the spark-bigquery-connector, and use Dataproc to
  • BWrite SQL queries to transform the data in-place in BigQuery.
  • CAdd the transformations as a preprocessing layer in the TensorFlow models.
  • DCreate a Dataflow pipeline that uses the BigQuerylO connector to ingest the data, process it, and

How the community answered

(52 responses)
  • A
    13% (7)
  • B
    77% (40)
  • C
    4% (2)
  • D
    6% (3)

Why each option

To preprocess BigQuery data with min-max scaling and bucketing for TensorFlow training with minimal time, cost, and effort, perform these transformations directly within BigQuery using SQL queries.

AWrite the transformations into Spark that uses the spark-bigquery-connector, and use Dataproc to

Using Spark on Dataproc for transformations introduces additional operational overhead, cluster management, and potentially higher cost and development effort compared to native BigQuery SQL for common transformations.

BWrite SQL queries to transform the data in-place in BigQuery.Correct

Performing min-max scaling and bucketing directly in BigQuery using SQL queries leverages its highly optimized, serverless processing capabilities. This minimizes preprocessing time and cost as data remains in-place, and for common transformations like these, SQL offers a low-effort development path compared to external processing frameworks.

CAdd the transformations as a preprocessing layer in the TensorFlow models.

Adding these transformations as preprocessing layers within each TensorFlow model would lead to redundant computation on the large dataset for every training run, significantly increasing training time and cost rather than minimizing preprocessing effort upfront.

DCreate a Dataflow pipeline that uses the BigQuerylO connector to ingest the data, process it, and

Creating a Dataflow pipeline involves writing Beam code and managing a Dataflow job, which adds more development effort and complexity than simply using SQL queries within BigQuery for easily expressible transformations.

Concept tested: BigQuery data transformation, cost-effective data preprocessing

Source: https://cloud.google.com/bigquery/docs/best-practices-sql-queries

Topics

#BigQuery#Data preprocessing#Feature engineering#Cost optimization

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-MACHINE-LEARNING-ENGINEER Practice