BigQuery ML Supported Models and Export for the ML Engineer Exam

GCP Study Hub
November 10, 2026

BigQuery ML supports a wide set of supervised, unsupervised, and time series models directly inside BigQuery using SQL, and models trained there do not have to remain inside BigQuery for serving. On the Professional Machine Learning Engineer exam, scenario questions often test which model family fits a given problem, how time series options behave in SQL, and when a team should export a trained model or register it for external serving instead of running predictions inside BigQuery.

Supported model families in BigQuery ML

For supervised learning, BigQuery ML covers both regression and classification workloads across several levels of model complexity:

  • Linear regression predicts continuous values by fitting the best straight line through the data.
  • Logistic regression handles binary classification problems.
  • Boosted trees and random forests capture non-linear relationships and more complex patterns that simpler linear models can miss.
  • Deep neural networks provide DNN regression for continuous outcomes and DNN classification for categorical predictions.
  • AutoML models automatically select and tune the best algorithm for the dataset.

For unsupervised learning, BigQuery ML provides k-means clustering and Principal Component Analysis (PCA). K-means discovers natural groupings in data without labeled examples, which helps with tasks such as segmenting customers based on behavior patterns or identifying similar products. PCA performs dimensionality reduction on high-dimensional data with many features, reducing the number of variables while preserving the most important information. Reducing dimensionality makes datasets easier to visualize and can improve the performance of downstream models.

For time series forecasting, BigQuery ML offers ARIMA_PLUS for standard forecasting and ARIMA_PLUS_XREG when external predictors need to be included. Both models forecast future values from historical patterns, accounting for trends and seasonality, while ARIMA_PLUS_XREG also accounts for external factors that influence the target.

Time series forecasting with ARIMA_PLUS and ARIMA_PLUS_XREG

The syntax and behavior of ARIMA_PLUS and ARIMA_PLUS_XREG are worth knowing in detail for the Professional Machine Learning Engineer exam. Both models are trained with a CREATE MODEL statement that specifies the model type inside an OPTIONS clause and pulls training data from a SELECT statement, but they handle input columns differently.

ARIMA_PLUS is a univariate model. It forecasts a single column using only that column's own historical values, with nothing outside the series influencing the prediction. If a query forecasts transaction quantity, past transaction quantity is the only signal the model uses. Three options define the structure of the time series:

  • time_series_timestamp_col points to the column holding the time points used for training, such as a date column. BigQuery uses this column to order rows in time and infer the data frequency, whether daily, weekly, or monthly.
  • time_series_data_col points to the target column to forecast, such as transaction quantity.
  • time_series_id_col specifies one or more identifier columns, such as country and product name. Each unique combination of those values identifies a separate time series, so a single CREATE MODEL statement trains an independent forecast for every country and product pair rather than pooling them into one series. BigQuery runs these modeling pipelines in parallel, which allows one query to cover a very large number of series at once.

The SELECT statement feeding an ARIMA_PLUS model must return every column referenced in OPTIONS, including the timestamp column, the value being forecast, and any identifier columns.

ARIMA_PLUS_XREG uses the same overall CREATE MODEL, OPTIONS, and SELECT structure, but it is a multivariate model. The XREG suffix stands for external regressors, which are extra columns supplied alongside the target's history to help explain changes in the forecast value. For example, alongside date and transaction quantity, a query might include a holiday flag to explain jumps in transaction quantity that history alone would not predict, and daylight hours to provide a seasonal signal tied to day length rather than only the position of the date in the series.

Nothing in the OPTIONS clause names these external regressor columns. Any column returned by the SELECT statement that is not the timestamp column, the data column, or an ID column is treated as an external regressor automatically. Adding external predictors is therefore done simply by including them in the SELECT list.

One practical requirement separates ARIMA_PLUS_XREG from ARIMA_PLUS at prediction time. Because the model depends on those external columns, their values must also exist for the future dates being forecast. To project transaction quantity forward, the caller must supply future values for both the holiday flag and daylight hours on every forecast date.

Exporting BigQuery ML models to Cloud Storage

Training a model in BigQuery ML does not lock predictions into BigQuery. The EXPORT MODEL statement exports a trained model by name to a specified Cloud Storage location, making it portable across other environments and serving platforms. Exported models preserve their learned parameters and structure, so predictions remain consistent whether run inside BigQuery or outside it.

The exported file format depends on the model type:

  • Tree-based models, including boosted tree classifiers, boosted tree regressors, and random forest regressors, export in XGBoost format with a .bst file extension. This format works with XGBoost libraries across different programming environments.
  • All other models, including DNN classifiers, DNN regressors, k-means, linear regression, logistic regression, PCA, and AutoML models, export in TensorFlow SavedModel format. The export writes a complete SavedModel directory structure containing the model architecture, weights, and metadata required for serving. Even when the trained model is not a deep learning model, exporting any of these non-tree model types still produces a TensorFlow SavedModel.

Exporting to Cloud Storage fits scenarios where teams need to deploy models to edge devices, integrate them into web applications, or run them inside batch processing pipelines outside BigQuery.

Registering models directly to Agent Platform Model Registry

Exporting to Cloud Storage is not the only way to move a BigQuery ML model into broader serving workflows. You can also register a new or existing BigQuery ML model directly to Gemini Enterprise Agent Platform (formerly Vertex AI) Model Registry using the Google Cloud console, SQL, the bq command-line tool, or the API.

Direct registration requires no export step, so there is no need to write model artifacts out to Cloud Storage first. Once registered in Agent Platform Model Registry, the model gains versioning, appears in a single registry alongside models trained directly in Agent Platform, and can be deployed to an endpoint for online predictions.

When to use BigQuery ML models outside BigQuery

Scenarios on the Professional Machine Learning Engineer exam often describe operational or architectural constraints that make exporting or registering a model the right choice rather than keeping inference inside BigQuery. Four sets of requirements drive that decision:

  • Deployment targets: Edge devices such as mobile phones or IoT sensors with limited network connectivity, web and mobile applications that need local inference for responsive user experiences, or existing ML pipelines and infrastructure that need to incorporate BigQuery-trained models without restructuring the surrounding workflow.
  • Performance and cost optimization: High-volume prediction workloads or real-time applications requiring very low latency can achieve faster inference outside BigQuery. When generating millions of predictions, serving outside BigQuery can also reduce cost by avoiding the per-query charges associated with BigQuery ML predict calls.
  • Model management: As ML operations mature, teams often need formal version control, compliance and auditability features, and a centralized model registry that tracks models across different platforms and teams.
  • Cross-platform flexibility: Exported or registered models can run inside Python applications, deploy to Cloud Run Functions for serverless inference, integrate into Dataflow pipelines for stream processing, or deploy to Agent Platform for managed model serving with autoscaling and monitoring.

Our Professional Machine Learning Engineer course covers BigQuery ML supported models and export alongside SQL-based training workflows and Agent Platform model serving, with practice questions that drill these distinctions.

Get tips and updates from GCP Study Hub

arrow