Skip to content
Aviato Consulting
#AI • • 4 min read

Video Post: AI with BigQuery And SQL

Video: BigQuery ML lets you run AI models on your BigQuery data with SQL, from regression and clustering to forecasting, without hiring data scientists.

Aviato Video Briefing

Watch Ben King explain how to run machine learning models in BigQuery using standard SQL.

Watch on YouTube →

Key Takeaways

  • Run ML where your data already lives: If your analytics data is in Google BigQuery, BigQuery ML (BQML) lets you train and run machine learning models directly in place without moving data out of the warehouse.
  • Use existing SQL skills: Analysts and DBAs who already write SQL can build predictive models without needing a dedicated team of Python data scientists.
  • Six high-ROI models built in: BigQuery ML supports Linear Regression, Logistic Regression, K-Means Clustering, Matrix Factorization, Principal Component Analysis (PCA), and Time-Series Forecasting out of the box.

6 Built-In BigQuery ML Models You Can Run with SQL

1. Linear Regression (Sales & Staffing Prediction)

Predict continuous numerical outcomes—such as expected sales volume or staffing requirements during a promotion—based on historical data.

2. Logistic Regression (Churn & Fault Classification)

Classify rows into discrete categories, such as predicting whether a customer is likely to purchase again or flagging manufacturing batches likely to be faulty.

3. K-Means Clustering (Customer Segmentation)

Automatically discover hidden groupings and behavioral cohorts inside your customer base so marketing teams can target campaigns accurately.

4. Matrix Factorization (Product Recommendations)

Power “Customers who bought X also bought Y” collaborative filtering recommendation engines directly over your transaction tables.

5. Principal Component Analysis — PCA (Pattern Discovery)

Reduce complex, high-dimensional datasets down to the most important underlying variables so analysts can spot macro trends faster.

6. Time-Series Forecasting (ARIMA_PLUS)

Forecast future sales and seasonal inventory demand from historical time-series data—accounting automatically for trends, seasonality, and holidays.


Full Video Transcript

If you have a lot of data stored on Google Cloud for analytics, it’s probably stored in BigQuery. Right now, everyone is trying to do AI—training models, tuning pre-existing models, and spending a lot of money on data scientists.

I’ve got some great news: if you’re using BigQuery, it has BigQuery ML built right into it. This lets you run AI and machine learning against your BigQuery dataset using SQL. SQL is the language already used by your data analysts and database administrators. It’s straightforward to use, and you probably already have the skills in-house—so you don’t need to hire expensive data scientists and AI engineers just to start gathering predictive insights from your data.

Let’s break down six of the models built into BigQuery ML to see how they solve real business problems:

  1. Linear Regression: Predicting how much you’ll sell based on past data. If you’re planning stock, staffing, or trying to run promotions more accurately, this is built in and can be run with SQL.
  2. Logistic Regression: Sorting things into categories—for example, predicting whether customers are going to buy from you again, or identifying whether products are likely to be faulty.
  3. K-Means Clustering: Finding hidden groups within your customer base so you can target marketing campaigns toward them.
  4. Matrix Factorization: Suggesting which customers are likely to buy an item—this powers the predictive “You might also like to buy X” recommendations you see on e-commerce websites.
  5. PCA (Principal Component Analysis): Simplifying complex data to find the most important patterns, helping you spot trends and make more informed decisions.
  6. Time-Series Forecasting: Predicting future sales based on historical data, helping you forecast demand and make sure you have enough stock on hand.

All of these models are already built into BigQuery ML and can be accessed using standard SQL queries—enabling your organisation to make AI-driven decisions without spending a fortune. If you want help setting this up, reach out to Aviato Consulting!

Tags: #BigQuery #BigQuery ML #SQL #Machine Learning #Data Analytics
Written by

Founder & CEO

Founder of Aviato Consulting and former Google Cloud Consulting Lead for APAC, specialising in enterprise cloud architecture, APRA CPS 234 and agentic AI.

Keep Reading
FAQ

Frequently Asked Questions

What is BigQuery ML and how does it work?

BigQuery ML lets data analysts and database administrators train and execute machine learning models directly inside Google BigQuery using standard SQL queries—eliminating the need to export data to separate ML clusters or hire specialized Python data science teams for common predictive tasks.

Which machine learning models are built into BigQuery ML?

BigQuery ML includes built-in SQL support for Linear Regression (sales and demand prediction), Logistic Regression (customer churn and fault classification), K-Means Clustering (customer segmentation), Matrix Factorization (product recommendations), Principal Component Analysis / PCA (dimensionality reduction), and Time-Series Forecasting (ARIMA_PLUS).

When should a business use BigQuery ML instead of custom Vertex AI training?

Use BigQuery ML whenever your structured transactional or operational data already lives in BigQuery and your team wants fast, explainable forecasting, churn prediction, or segmentation using existing SQL skills.

Talk to an architect who has done this before.

Bring your current setup and the outcome you need. You will get a view on the approach, the risks and roughly what it costs.

Book a 20-min architecture call

Straight to a senior GCP architect. No SDR, no slide deck.

Not ready to talk? See how we migrated Hapana off AWS →

Or call +61 2 8359 9507 · Hello@aviato.consulting

Call us Book a call

Quick navigation