Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
Google Cloud · Associate Data Practitioner

BigQuery ML and AutoML

Associate Data Practitioner · Lesson 8 of 16 · 50:16

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the Google Cloud Associate Data Practitioner exam, on the official exam guide. In this lesson: planning a machine learning project, use cases for BigQuery ML and AutoML, creating and evaluating a model with SQL, and making predictions and forecasts. Includes three original practice questions, with Cymbal Energy, a fictional electricity and gas supplier, as the example.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Predictions without a data scientist

Cymbal Energy wants to predict two things: tomorrow's electricity demand in each town, and which customers are likely to leave for another supplier. Its analysts know SQL, but nobody on the team is a machine learning engineer. BigQuery ML lets them train and use models where the data already is.

Planning an ML project

A standard machine learning project follows a few steps. Collect and prepare the data, with a label, the value to predict, like whether a customer left, and features, the inputs, like contract type and monthly usage. Train a model on part of the data, and keep another part aside to evaluate it, on rows it has never seen. Evaluate it with the right metrics, and compare it with a simple baseline. Then use it for predictions, and watch its quality over time, because the data keeps changing.

BigQuery ML and AutoML

BigQuery ML trains models with SQL, inside BigQuery, without moving the data. It covers common cases: linear regression to predict a number, like monthly consumption, logistic regression or boosted trees to predict a category, like whether a customer leaves, K means to group similar customers, and arima plus to forecast a time series, like daily demand. AutoML, part of Gemini Enterprise Agent Platform, formerly Vertex AI, searches for a good model for you, on tabular data or images, with little machine learning expertise. And BigQuery ML can use AutoML too, through its AutoML classifier and regressor model types.

Creating and evaluating a model

Training is one SQL statement: create model, with options for the model type and the label column, followed by the query that returns the training rows. BigQuery ML sets evaluation data aside automatically, unless you choose the split yourself. Then the ML.EVALUATE function returns metrics: for a classification model, like precision, recall, and the area under the curve, and for a regression model, like the mean absolute error. Compare these metrics across versions of the model, and with a baseline, before you trust it.

Making predictions

To predict, run the ML.PREDICT function on new rows: it returns each row with its predicted label, and for classification, the probability of each class. For time series models, the ML.FORECAST function returns future values, with a prediction interval. Predictions are just query results: write them to a table, schedule them, and show them in a dashboard. And for predictions inside an application, a model can be registered and served through Gemini Enterprise Agent Platform.

Recap

Let's recap. A machine learning project collects data with a label and features, trains, evaluates on unseen rows, predicts, and keeps watching. BigQuery ML trains models with SQL: regression, classification, K means, and arima plus for time series. AutoML, in Gemini Enterprise Agent Platform, finds a good model with little expertise, and BigQuery ML can call it. Create model trains, and ML.EVALUATE returns the metrics. And ML.PREDICT and ML.FORECAST turn the model into results that you can schedule and show.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. The analysts want to forecast daily electricity demand in each town for the next 30 days, from three years of daily history, using only SQL in BigQuery. Which model type fits?

    • KMEANS clustering
    • ARIMA_PLUS time series
    • LOGISTIC_REG classification
    • A remote model over a language model
    Show the answer

    ARIMA_PLUS time series

    An arima plus model forecasts time series, like daily demand per town, right in BigQuery. “KMEANS clustering” only groups similar rows, without forecasting anything. “LOGISTIC_REG classification” only predicts a category, like yes or no. And “A remote model over a language model” would generate text, not forecast numbers.

  2. A churn model was just trained with CREATE MODEL. Before using it, the team wants its precision and recall, measured on data the model did not train on. What should they run?

    • ML.PREDICT on new customers
    • Another CREATE MODEL with more rows
    • A dry run of the training query
    • ML.EVALUATE on the model
    Show the answer

    ML.EVALUATE on the model

    ML.EVALUATE returns precision, recall, and other metrics, measured on the evaluation data. “ML.PREDICT on new customers” only returns predictions for each customer, not the quality of the model. “Another CREATE MODEL with more rows” would only train another model. And “A dry run of the training query” only reports the bytes that a query would read.

  3. Every night, the churn model must score all active customers, and the results must feed the retention team’s dashboard. What should the data practitioner set up?

    • A scheduled query running ML.PREDICT into a table
    • A nightly CREATE MODEL to retrain the model
    • A nightly ML.EVALUATE of the model
    • A spreadsheet export for manual review
    Show the answer

    A scheduled query running ML.PREDICT into a table

    A scheduled query runs ML.PREDICT every night, and writes the scores to a table that the dashboard reads. “A nightly CREATE MODEL to retrain the model” would retrain the model, without scoring the customers. “A nightly ML.EVALUATE of the model” only measures the model, with no score for each customer. And “A spreadsheet export for manual review” would replace the model with manual work.