Automating Conditional Model Retraining in BigQuery ML
Short answer
D Use BigQuery procedural language to write a query that runs the ML.EVALUATE statement, stores the MAE in a variable, and uses an IF statement to conditionally execute the CREATE OR REPLACE MODEL statement.
Question
Key Takeaways
The main trap is assuming scheduled queries alone can handle conditional logic; BigQuery scripting (procedural SQL) is required to store evaluation metrics and use IF statements for decision-making.
Learn how to implement automated, conditional retraining for BigQuery ML models using native SQL scripting and scheduled queries without external orchestration.
Common mistake: Option B is incorrect because 'warm_start' only optimizes retraining speed; it does not provide the conditional evaluation logic needed to decide whether to retrain based on MAE thresholds.
Expert Analysis
The question requires an automated retraining strategy using native BigQuery capabilities to minimize external dependencies. The workflow must evaluate the model against new data and conditionally trigger retraining based on a specific metric (MAE > 500).
Option D is the correct solution because it leverages BigQuery Procedural Language (SQL scripting). This feature allows you to write a single script that executes ML.EVALUATE, stores the resulting MAE in a variable, uses an IF statement to check the threshold, and conditionally runs CREATE OR REPLACE MODEL. By scheduling this script via a BigQuery scheduled query, the entire logic remains within BigQuery, satisfying the constraint of minimizing external dependencies.
The most attractive but wrong answer is Option B. It suggests using warm_start = TRUE with a scheduled query. While warm_start is a valid option for efficient retraining, it always retrains the model when executed. It lacks the conditional logic required to evaluate performance first; thus, it cannot implement the "retrain if MAE exceeds 500" requirement. As noted in community feedback, options A and C introduce external services (Agent Platform Pipelines, Cloud Run), which violates the "minimize external dependencies" constraint.
Key distinction: Native conditional logic inside BigQuery vs. always-on scheduled training.
Exam Strategy
When a question emphasizes 'native' or 'minimal external dependencies,' prioritize solutions that stay within the core service's built-in features. For BigQuery ML, this means using SQL scripting (DECLARE, SET, IF) and scheduled queries rather than external tools like Cloud Functions or Vertex AI Pipelines unless explicitly required by complexity constraints.
Frequently Asked Questions
Can I use warm_start for conditional retraining?
What is BigQuery Procedural Language?
Community Votes
100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 2 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 2
-
taylz876 👍 1 Answered DWhy D is right • It makes the decision inside BigQuery. BigQuery procedural language (scripting) lets you write several SQL statements together with variables and IF conditions. In one script it evaluates the model with ML.EVALUATE, stores the MAE in a variable, and runs CREATE OR REPLACE MODEL only if the MAE is above 500. • A scheduled query runs the script every Sunday, so the whole workflow is automatic. • No external dependencies and low cost: nothing outside BigQuery is involved, and retraining only happens when it's needed. BigQuery procedural language (scripting) means writing several SQL statements together in one script, with the programming features SQL normally lacks: variables, IF conditions and loops. It's what answer D uses. Why the others are wrong • A: An Agent Platform Pipelines workflow can do it, but it's an extra external service with extra setup, and the question wants native BigQuery. • B: warm_start = TRUE retrains every Sunday from the existing model, whatever the error is. There's no condition on the MAE, so it doesn't meet "retrain only if MAE exceeds 500". • C: Cloud Scheduler plus a Cloud Run function (now a Cloud Run Function) adds external services and custom code.
-
n2183712847 👍 1 Answered DCorrect answer: D. BigQuery scripting can natively run ML.EVALUATE, store the MAE in a variable, use an IF condition to retrain only when the threshold is exceeded, and run automatically through a scheduled query; A and C add unnecessary external orchestration services, while B always retrains on schedule and does not evaluate the MAE or conditionally trigger retraining.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All PMLE Questions
Access 65 questions with complete answers and detailed explanations.
View Full PMLE Practice Test →