Leverages BigQuery's built-in machine learning and GenAI capabilities for advanced data analytics. Use when you need to write SQL queries that perform time-series forecasting, detect outliers, find key drivers, or leverage generative AI capabilities in BigQuery.
BigQuery AI & ML is a reference skill for using BigQuery's built-in machine learning and generative AI capabilities directly from SQL, via its integration with Vertex AI. It solves the problem of performing advanced analytics (forecasting, anomaly detection, driver analysis, and content generation) without training or managing custom models, by documenting BigQuery's built-in functions and their syntax.
The skill organizes four capabilities into dedicated reference files. AI.FORECAST uses the pre-trained TimesFM foundation model for time-series forecasting, with documented arguments (data column, timestamp column, horizon, confidence level, id columns for multiple series, context window) and output schema including prediction intervals. AI.DETECT_ANOMALIES compares a target dataset against a historical one to flag deviations with anomaly probabilities and expected-range bounds. AI.GENERATE provides general-purpose text and content generation using Gemini models, and AI.KEY_DRIVERS automatically identifies the dimensional segments most responsible for changes in a metric. Each reference includes SQL syntax, input arguments, output schemas, and worked examples against public datasets. The skill also points to a related BigQuery Basics skill for core concepts, resource management, CLI, and client libraries.
It targets data analysts, data engineers, and analytics practitioners who work in BigQuery and want to add forecasting, anomaly detection, key-driver analysis, or GenAI to their SQL queries. It is documentation and query-authoring guidance; the SQL it helps write runs read-oriented analytics against the user's own BigQuery data.
Write BigQuery SQL that performs time-series forecasting (AI.FORECAST), anomaly detection (AI.DETECT_ANOMALIES), key-driver analysis (AI.KEY_DRIVERS), and generative text/content (AI.GENERATE), using built-in functions backed by Vertex AI.
No. AI.FORECAST and AI.DETECT_ANOMALIES use the pre-trained TimesFM foundation model, and AI.GENERATE uses Gemini models, so no custom training or model management is required.
You supply a numeric data column and a timestamp column, optionally id columns for multiple series. The functions require a minimum of 3 data points, and forecasting defaults to a horizon of 10 with a 0.95 confidence level.
A BigQuery environment with the Vertex AI integration for these built-in functions. The skill references a companion BigQuery Basics skill for core concepts, resource management, CLI, and client libraries.
It is reference and query-authoring documentation: syntax tables, argument descriptions, output schemas, and examples for each function.
Quick Setup:
.claude/skills/Repository
google/skills