A retail analytics team wants to build a BigQuery ML churn-prediction model directly on a raw transactions table. They need to scale continuous column spend_amount to a range and convert the categorical column membership_tier into separate binary indicators. The team prefers not to create intermediate tables or views and wants preprocessing to be applied consistently during both training and online prediction. Which approach best meets these requirements in BigQuery ML?
Create the model with a TRANSFORM clause that calls ML.NORMALIZER(spend_amount) and ML.ONE_HOT_ENCODER(membership_tier); BigQuery ML will learn the scaling parameters during training and re-apply them during prediction.
Build a materialized view that performs the scaling and one-hot encoding, then point CREATE MODEL at the view so preprocessing happens outside the model.
Store the raw table in Vertex AI Feature Store and configure a feature-engineering pipeline; reference the resulting feature view from BigQuery ML during training and serving.
Run a scheduled UPDATE query that rewrites the training table with normalized and encoded columns before each CREATE MODEL statement.
Using a TRANSFORM clause inside CREATE MODEL lets you express feature-engineering steps that BigQuery ML executes during training and then stores as part of the model object. Functions such as ML.NORMALIZER() rescale numeric features to based on training-set statistics, while ML.ONE_HOT_ENCODER() expands a categorical column into binary vectors. Because the transformations are saved with the model, they are automatically and consistently applied when the model is later used for batch or real-time prediction, eliminating the need for separate preprocessing pipelines or materialized data copies. The other options either require manual table rewrites, rely on external services that BigQuery ML cannot invoke at prediction time, or do not guarantee consistent transformations on new data.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is the TRANSFORM clause important in BigQuery ML?
Open an interactive chat with Bash
What is ML.NORMALIZER() and how does it scale data?
Open an interactive chat with Bash
How does ML.ONE_HOT_ENCODER() handle categorical data in BigQuery ML?
Open an interactive chat with Bash
What is ML.NORMALIZER() in BigQuery ML?
Open an interactive chat with Bash
How does ML.ONE_HOT_ENCODER() work in BigQuery ML?
Open an interactive chat with Bash
What are the advantages of using the TRANSFORM clause in BigQuery ML?
Open an interactive chat with Bash
GCP Professional Data Engineer
Preparing and using data for analysis
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .