BigQuery ML is a service within Google Cloud's BigQuery that lets you build machine learning models directly using SQL. It is designed for users who are comfortable with SQL and whose data is already stored in BigQuery, making it a low-code solution for tasks like classification, regression, forecasting, and clustering.
The workflow for creating a model in BigQuery ML follows a sequence of SQL statements. You start by using a CREATE MODEL statement to define and train your model. During this step, you can add feature preprocessing, either automatically by the service or manually using a TRANSFORM clause. After training, you evaluate the model's performance with functions like ML.EVALUATE and then use it for predictions with ML.PREDICT. This entire process, from data preparation to a working model, happens inside BigQuery's SQL environment.
BigQuery ML supports several categories of models. Internally trained models are built directly into the service and include linear regression, logistic regression, k-means clustering, and time series models like ARIMA_PLUS. Externally trained models are trained in Vertex AI but can be managed from BigQuery; these include complex models like Deep Neural Networks (DNN), Boosted Trees, and Random Forest. You can also create remote models that connect to pre-trained models hosted on Vertex AI endpoints, allowing for prediction without moving your data.
BigQuery ML automatically handles common data preparation steps. For numbers, it standardizes them to have a mean of zero. For categories, like text or true/false values, it applies one-hot encoding. It also fills in missing (NULL) values with sensible defaults. You can override this with your own custom transformations using the TRANSFORM clause. For optimizing model accuracy, BigQuery ML offers automated hyperparameter tuning, which tests many different settings to find the best one, saving you from manual trial and error.
Models built in BigQuery ML can be brought into the broader Vertex AI platform for production use. You can register a BigQuery ML model with the Vertex AI Model Registry for versioning and management. From there, it can be deployed to online prediction endpoints just like any other Vertex AI model. This integration allows for a complete model lifecycle. You can also use Vertex AI Pipelines with special BigQuery ML components to automate workflows that include data prep, training in BigQuery, and deployment.
Choose BigQuery ML when your data is already in BigQuery, your team is skilled in SQL, and your business problem fits one of its supported model types. It is very efficient for analyzing tabular data. For more complex custom models or problems it doesn't support, you would typically choose Vertex AI custom training or AutoML instead.
AutoML in Vertex AI automates the process of building machine learning models. It handles data preprocessing, chooses the model architecture, tunes settings, and manages the computing resources. Engineers configure these automated pipelines to solve specific business problems like classification, regression, or forecasting, allowing teams to deploy reliable models with minimal manual work.
Configuring an AutoML pipeline starts by selecting what you want to predict (the target column) and defining the goal, such as minimizing prediction error. For tabular data, you use the Vertex AI SDK for Python with classes like AutoMLTabularTrainingJob to set these objectives. A key step is defining how your data is split—for example, 60% for training, 20% for validation, and 20% for testing—to ensure the model is properly evaluated. You also set a training budget in compute hours (budget_milli_node_hours) and can enable early stopping to halt training if the model stops improving, which saves costs.
For large-scale tabular data problems, Vertex AI offers specialized workflows that give you more control than standard AutoML. The Tabular Workflow for End-to-End AutoML lets you skip certain automated steps, choose specific hardware, or reduce model size. When understanding why a model makes a prediction is critical, the Tabular Workflow for TabNet uses attention mechanisms to highlight the most important features. For time-series forecasting, you select from different deep learning architectures based on your data size and speed needs, such as TiDE for fast forecasts or TemporalFusionTransformer (TFT) for complex, multi-horizon predictions.
Before a model is deployed, AutoML pipelines evaluate its performance using task-specific metrics like precision for classification or error rates for regression. These results are stored in Vertex ML Metadata so you can compare different model versions in Vertex AI Experiments. Vertex Explainable AI provides feature attributions, which show how much each input feature contributed to a prediction. This helps engineers verify that the model's decisions make sense and are not based on biased or incorrect data.
Vertex AI Pipelines orchestrates the entire AutoML workflow as a sequence of connected steps, known as a directed acyclic graph (DAG). The pipeline first brings data into a managed dataset, triggers the AutoML training job, registers the resulting model in the Vertex AI Model Registry, and finally deploys it for predictions. Deployment depends on the use case: for real-time, low-latency needs, the model is deployed to a scalable Vertex AI endpoint. For processing large batches of data, the pipeline uses batch inference jobs that run asynchronously without needing constantly running servers.
Choosing the right low-code ML framework involves analyzing your business goals, the type of data you have, and your performance needs to decide between BigQuery ML and AutoML on Vertex AI.
BigQuery ML integrates data, infrastructure, and predefined models into one system where you build models using SQL. Choose it when all your data is already in BigQuery, your team is proficient in SQL, and your problem matches its supported model types. These include linear/logistic regression, k-means clustering, time series forecasting with ARIMA_PLUS, and externally trained models like Boosted Trees or Deep Neural Networks.
AutoML automates nearly the entire model development process, including choosing the architecture and tuning hyperparameters. Choose it when your data is structured (tabular), image, text, or video, and your model can tolerate inference latencies above 100 milliseconds. It is fully managed and searches for the best model from options like neural networks and boosted trees, creating a final ensemble model.
The business problem dictates which model type to use. Binary classification predicts one of two outcomes, like "yes" or "no." Multi-class classification chooses one category from many, like customer segments. Regression predicts a continuous number, like future sales. Forecasting predicts a sequence of future values, like product demand. K-means clustering is an unsupervised technique that finds natural groupings in data without predefined labels.
The decision between BigQuery ML and AutoML hinges on several factors. Pick BigQuery ML if your data resides in BigQuery, your team knows SQL well, and a predefined model type fits your use case. Pick AutoML if you are working with image, video, or text data, need advanced neural network architectures, or want the platform to handle all the complex tuning automatically. Choose custom training on Vertex AI only if your problem doesn't fit the criteria for either low-code option. Both services have limitations: BigQuery ML has project-based quotas, and AutoML has data size limits that vary by data type.
Use BigQuery ML when your dataset is already stored in BigQuery and your team is proficient in SQL, as it allows for quick model development and inference without moving data. Choose Vertex AI AutoML when you need to work with image, text, or video data, or when you want the platform to automatically handle complex tasks like architecture search and hyperparameter tuning.
Online inference deploys a model to a Vertex AI endpoint to handle real-time, synchronous prediction requests, which is necessary for low-latency applications like a live website. Batch inference processes large accumulated datasets asynchronously in a job, which is suitable for high-throughput tasks like generating predictions for all customers overnight, without needing constantly running servers.
BigQuery ML automatically performs common preprocessing steps: it standardizes numeric features (centering to zero mean), applies one-hot encoding to categorical features, and imputes missing NULL values with the column mean or a special category. You can also define custom preprocessing logic using the TRANSFORM clause within the CREATE MODEL statement for full control.
Professional Machine Learning Engineer
Prepare and test your skills
Prepare and test your skills