Trigger: Use when working with Google BigQuery — querying, partitioning, clustering, cost controls, and best practices.
BigQuery Basics
BigQuery is a serverless, AI-ready data platform that enables high-speed
analysis of large datasets using SQL and Python. Its disaggregated architecture
separates compute and storage, allowing them to scale independently while
providing built-in machine learning, geospatial analysis, and business
intelligence capabilities.
Setup and Basic Usage
Enable the BigQuery API:
gcloud services enable bigquery.googleapis.com --quiet
Create a Dataset:
bq mk --dataset --location=US my_dataset
Create a Table:
Create a file named schema.json with your table schema:
[
{
"name": "name",
"type": "STRING",
"mode": "REQUIRED"
},
{
"name": "post_abbr",
"type": "STRING",
"mode": "NULLABLE"
}
]
Then create the table with the bq tool:
bq mk --table my_dataset.mytable schema.json
Run a Query:
bq query --use_legacy_sql=false \
'SELECT name FROM `bigquery-public-data.usa_names.usa_1910_2013` \
WHERE state = "TX" LIMIT 10'
Reference Directory
Core Concepts: Storage types, analytics
workflows, and BigQuery Studio features.
CLI Usage: Essential bq command-line tool
operations for managing data and jobs.
Client Libraries: Using Google Cloud
client libraries for Python, Java, Node.js, and Go.
MCP Usage: Using the BigQuery remote MCP server and
Gemini CLI extension.
Infrastructure as Code: Terraform examples for
datasets, tables, and reservations.
IAM & Security: Roles, permissions, and data
governance best practices.
If you need product information not found in these references, use the
Developer Knowledge MCP server search_documents tool.
Related Skills
- BigQuery AI & ML Skill:
SKILL.md file for BigQuery AI and ML capabilities (forecast, anomaly
detection, text generation).
1---2name: bigquery-basics3description: **Trigger**: Use when working with Google BigQuery — querying, partitioning, clustering, cost controls, and best practices.4---56**Trigger**: Use when working with Google BigQuery — querying, partitioning, clustering, cost controls, and best practices.78# BigQuery Basics910BigQuery is a serverless, AI-ready data platform that enables high-speed11analysis of large datasets using SQL and Python. Its disaggregated architecture12separates compute and storage, allowing them to scale independently while13providing built-in machine learning, geospatial analysis, and business14intelligence capabilities.1516## Setup and Basic Usage17181. **Enable the BigQuery API:**1920 ```bash21 gcloud services enable bigquery.googleapis.com --quiet22 ```23242. **Create a Dataset:**2526 ```bash27 bq mk --dataset --location=US my_dataset28 ```29303. **Create a Table:**3132 Create a file named `schema.json` with your table schema:3334 ```json35 [36 {37 "name": "name",38 "type": "STRING",39 "mode": "REQUIRED"40 },41 {42 "name": "post_abbr",43 "type": "STRING",44 "mode": "NULLABLE"45 }46 ]47 ```4849 Then create the table with the `bq` tool:5051 ```bash52 bq mk --table my_dataset.mytable schema.json53 ```54554. **Run a Query:**5657 ```bash58 bq query --use_legacy_sql=false \59 'SELECT name FROM `bigquery-public-data.usa_names.usa_1910_2013` \60 WHERE state = "TX" LIMIT 10'61 ```6263## Reference Directory6465- [Core Concepts](references/core-concepts.md): Storage types, analytics66 workflows, and BigQuery Studio features.6768- [CLI Usage](references/cli-usage.md): Essential `bq` command-line tool69 operations for managing data and jobs.7071- [Client Libraries](references/client-library-usage.md): Using Google Cloud72 client libraries for Python, Java, Node.js, and Go.7374- [MCP Usage](references/mcp-usage.md): Using the BigQuery remote MCP server and75 Gemini CLI extension.7677- [Infrastructure as Code](references/iac-usage.md): Terraform examples for78 datasets, tables, and reservations.7980- [IAM & Security](references/iam-security.md): Roles, permissions, and data81 governance best practices.8283*If you need product information not found in these references, use the84Developer Knowledge MCP server `search_documents` tool.*8586## Related Skills8788- [BigQuery AI & ML Skill](../bigquery-ai-ml):89 SKILL.md file for BigQuery AI and ML capabilities (forecast, anomaly90 detection, text generation).