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.
Watch Ben King explain how to run machine learning models in BigQuery using standard SQL.
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:
- 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.
- 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.
- K-Means Clustering: Finding hidden groups within your customer base so you can target marketing campaigns toward them.
- 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.
- PCA (Principal Component Analysis): Simplifying complex data to find the most important patterns, helping you spot trends and make more informed decisions.
- 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!
Founder of Aviato Consulting and former Google Cloud Consulting Lead for APAC, specialising in enterprise cloud architecture, APRA CPS 234 and agentic AI.
Related Articles
We Built an Agent That Publishes Our Website
How our marketing team publishes to this site by chatting to a custom Gemini Enterprise agent, the guardrails that keep it safe, and our move to Astro.
How to Refactor Legacy Code Securely with AI
A playbook for Australian CIOs using AI to refactor legacy code securely, from sovereign tooling and tests first to CI/CD gates and risk committees.
Questions to Ask AI Consulting Firms in Australia
Five questions Australian enterprise leaders should ask AI consulting firms, from data residency and code ownership to ROI and partner status.