| name | bigquery-ml |
| description | Use when training, evaluating, deploying, or monitoring a machine learning model directly in BigQuery with SQL (CREATE MODEL and ML.* functions) — picking a model type, debugging CREATE MODEL options, choosing a preprocessing function, or operationalizing a model with a scheduled retrain pipeline. Covers classification, regression, clustering/dimensionality-reduction, forecasting, recommendations, driver analysis, model import/export/deployment, model-free preprocessing functions, and 8 production orchestration approaches. |
BigQuery ML
BigQuery ML trains and serves models with SQL: CREATE MODEL picks an algorithm via model_type, then ML.* functions evaluate/predict/explain/monitor it — no data leaves BigQuery, no separate training infrastructure.
This skill packages a verified, field-tested reference distilled from a project that built and live-tested every model type, model-free function, workflow, and pipeline approach listed below — not general BigQuery ML knowledge, but specific, evidence-backed gotchas (exact error messages, exact metric swings across retrains, exact option interactions) found by actually running this in BigQuery.
Decision tree
- Do you have a labeled target to predict?
- Categorical label → see
reference/classification.md
- Continuous numeric label → see
reference/regression.md
- No label at all (clustering, dimensionality reduction, embeddings, recommendations, time-series forecasting, or "why did this metric change") → see
reference/unsupervised-and-specialized.md
- Are you managing, deploying, or monitoring an existing model (importing one trained elsewhere, calling a Vertex AI endpoint from SQL, exporting a BQML model out, or checking training/serving skew and drift) → see
reference/model-management.md
- Are you doing feature engineering / preprocessing independent of any model type (scaling, bucketizing, encoding, imputation, text/image prep) → see