bigquery-ai-ml
Skill240 starsChanged 5 months agoApache-2.0View on GitHub
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, predict values, detect outliers or anomalies, find key drivers, perform semantic search or vector search, classify text, calculate similarity, summarize content, translate language, evaluate models, filter by semantic conditions, measure the causal effect of an intervention, compute correlations between columns, generate descriptive statistics and table distribution profiles, detect change points or structural breaks, extract trend or seasonality components, or leverage generative AI capabilities in BigQuery. Do not use for general BigQuery dataset, table, or job management requests.
7 other projects use a version of this, 7 of them edited.
Adopted by
Most recently taken up by
- oivanfelipe/claude-skillsedited, first seen Nov 8, 2026
- olaitanojo/skillsedited, first seen Oct 17, 2026
- google/adk-pythonedited, first seen Oct 13, 2026
- GoogleCloudPlatform/bigquery-data-analytics-pluginedited, first seen Oct 9, 2026
- google/skillsedited, first seen Sep 29, 2026
- Adhamxon/claude-code-skillsedited, first seen Jul 30, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 7
- google/skills★ 24k71% same
- google/adk-python★ 22k58% same
- gemini-cli-extensions/bigquery-data-analytics★ 5280% same
- GoogleCloudPlatform/bigquery-data-analytics-plugin★ 5280% same
- Adhamxon/claude-code-skills★ 236% same
- olaitanojo/skills★ 156% same
- oivanfelipe/claude-skills★ 056% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- accidental-data-loss-preventionSkill
- bigquery-bigframesSkill
- bigquery-data-transfer-serviceSkill
- bigquery-graph-authorSkill
- bigquery-graph-querySkill
- bigquery-observabilitySkill
- bigquery-optimizationSkill
- bigquery-troubleshootingSkill
- bigtable-basicsSkill
- building-data-appsSkill
- cloud-databases-onboardingSkill
- dak-setupSkill
- data-autocleaningSkill
- dataform-bigquerySkill
- dbt-bigquerySkill
- discovering-gcp-data-assetsSkill
- enforcing-resource-attributionSkill
- federate-lakehouse-catalogSkill
- gcp-composer-troubleshootingSkill
- gcp-dataflowSkill
- gcp-data-pipelinesSkill
- gcp-managed-airflow-dag-authoringSkill
- gcp-managed-airflow-migrationsSkill
- gcp-managed-airflow-recommendationsSkill
- gcp-managed-spark-upgradesSkill
- gcp-pipeline-orchestrationSkill
- gcp-pipeline-resource-provisioningSkill
- gcp-spark-observabilitySkill
- gcp-sparkSkill
- gcp-spark-troubleshootingSkill
- gcs-security-assessmentSkill
- google-cloud-storage-basicsSkill
- google-cloud-storage-bucket-architectSkill
- google-cloud-storage-fuseSkill
- managing-python-dependenciesSkill
- ml-best-practicesSkill
- notebook-guidanceSkill
- resolving-mcp-region-configsSkill
- schema-mappingSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 63
Usage: Default for per-row LLM text or multimodal structured extraction (output_schema).
- Very specific: line 79
Usage: Default one-step attribution of dimensional segments driving metric changes (interest_label_col TRUE vs.
- Distinctive: line 97
SQL Shape: CREATE MODEL
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
BigQuery AI & ML
BigQuery integrates with Vertex AI to provide powerful machine learning and
generative AI capabilities directly within SQL queries using built-in functions
like AI.FORECAST, AI.KEY_DRIVERS, AI.DETECT_ANOMALIES, and AI.GENERATE.
[!IMPORTANT] You MUST read and follow the global constraints and mandatory function routing rules in ai_function_best_practices.md before writing any BQML AI/ML SQL query.
Reference Directory
- Best Practices: ai_function_best_practices.md - Global constraints, connection settings, and mandatory syntax checks for BQML queries in notebooks.
Functions Reference
- AI.AGG (ai_agg.md)
- SQL Shape: Aggregate
- Requires CREATE MODEL: No
- Usage: Multi-row semantic aggregation with
GROUP BY; synthesizes 1 summary string across many rows (unlike per-rowAI.GENERATE).
- AI.CAUSAL_EFFECT (ai_causal_effect.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Quantifies counterfactual post-intervention impact on a time series after a specific treatment timestamp.
- AI.CLASSIFY (ai_classify.md)
- SQL Shape: Scalar
- Requires CREATE MODEL: No
- Usage: Semantic classification of text or multimodal unstructured data into predefined category labels.
- AI.DETECT_ANOMALIES (ai_detect_anomalies.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Zero-shot TimesFM detector for isolated time-series point anomalies/outliers (use
ML.DETECT_CHANGE_POINTSfor sustained regime shifts).
- AI.EVALUATE (ai_evaluate.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Zero-shot TimesFM time-series forecast evaluation/backtesting against a historical holdout split.
- AI.FORECAST (ai_forecast.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Zero-shot TimesFM time-series forecasting without training a custom model.
- AI.GENERATE (ai_generate.md)
- SQL Shape: Scalar
- Requires CREATE MODEL: No
- Usage: Default for per-row LLM text or multimodal structured extraction (
output_schema); returnsSTRUCT. Prefer overAI.GENERATE_TABLE.
- AI.GENERATE_EMBEDDING (ai_generate_embedding.md)
- SQL Shape: TVF
- Requires CREATE MODEL: Yes
- Usage: Batch generates
ARRAY<FLOAT64>vector embeddings for text or visual content using a remote embedding model.
- AI.GENERATE_TABLE (ai_generate_table.md)
- SQL Shape: TVF
- Requires CREATE MODEL: Yes
- Usage: Table-valued structured extraction (
FROMclause); only use instead ofAI.GENERATEwhen a remote model + TVF is explicitly needed.
- AI.IF (ai_if.md)
- SQL Shape: Scalar
- Requires CREATE MODEL: No
- Usage: Evaluates boolean semantic conditions (
BOOL) on text or multimodal data forWHERE/CASE/JOINfiltering (do not useAI.GENERATE_TABLE).
- AI.KEY_DRIVERS (ai_key_drivers.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Default one-step attribution of dimensional segments driving metric changes (
interest_label_colTRUEvs.FALSE). Prefer overCONTRIBUTION_ANALYSIS.
- AI.PREDICT (ai_predict.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Zero-shot TabFM foundation model for tabular classification or regression without training and managing custom models.
- AI.SCORE (ai_score.md)
- SQL Shape: Scalar
- Requires CREATE MODEL: No
- Usage: Assigns a continuous
FLOAT64semantic score to text or multimodal data for ranking or sorting (ORDER BY).
- AI.SEARCH (ai_search.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Simplified semantic search using a raw string query on tables with autonomous background embeddings (
AI.EMBEDgenerated column).
- AI.SIMILARITY (ai_similarity.md)
- SQL Shape: Scalar
- Requires CREATE MODEL: No
- Usage: Computes an on-the-fly semantic similarity score (
FLOAT64) between two text or multimodal inputs without stored embeddings.
- Remote Models (remote_models.md)
- SQL Shape: CREATE MODEL
- Requires CREATE MODEL: Yes
- Usage: Creates a Vertex AI
REMOTE WITH CONNECTION DEFAULTmodel entity for functions that require one (AI.GENERATE_TABLE,AI.GENERATE_EMBEDDING,VECTOR_SEARCH).
- CONTRIBUTION_ANALYSIS (ml_contribution_analysis.md)
- SQL Shape: CREATE MODEL
- Requires CREATE MODEL: Yes
- Usage: Model-based driver analysis (
CREATE MODEL ... OPTIONS(MODEL_TYPE='CONTRIBUTION_ANALYSIS')+ML.GET_INSIGHTS). UseAI.KEY_DRIVERSunless aMODELentity is required.
- ML.CORRELATION (ml_correlation.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Calculates statistical correlation coefficients between numeric columns, optionally sliced by dimensions.
- ML.DESCRIBE_DATA (ml_describe_data.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Generates descriptive statistics (e.g., count, mean, median, min, max, stddev, quantiles, nulls, top values) for columns in a table or subquery.
- ML.DETECT_CHANGE_POINTS (ml_detect_change_points.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Detects structural breaks or sustained regime shifts (
[begin_timestamp, end_timestamp]intervals) in a time series.
- ML.SEASONALITY (ml_seasonality.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Extracts recurring periodic/seasonal components from a historical time series.
- ML.TREND (ml_trend.md)
- SQL Shape: TVF
- Requires CREATE MODEL: No
- Usage: Extracts the smoothed long-term trend component from a historical time series.
- VECTOR_SEARCH (vector_search.md)
- SQL Shape: TVF
- Requires CREATE MODEL: Yes
- Usage: Searches pre-computed
ARRAY<FLOAT64>embedding columns between a base table and query table (paired withAI.GENERATE_EMBEDDING, unlikeAI.SEARCH).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

