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-basics3metadata:4 source: https://skillmd.com/skills/google/bigquery-basics5 category: BigDataAndAnalytics6description: >-7 Manages datasets, tables, and jobs in BigQuery. Use when you need to interact8 with BigQuery, run SQL queries, manage BigQuery resources (datasets, tables,9 views), or perform basic data ingestion and analysis.10---1112# BigQuery Basics1314BigQuery is a serverless, AI-ready data platform that enables high-speed15analysis of large datasets using SQL and Python. Its disaggregated architecture16separates compute and storage, allowing them to scale independently while17providing built-in machine learning, geospatial analysis, and business18intelligence capabilities.1920## Setup and Basic Usage21221. **Enable the BigQuery API:**2324 ```bash25 gcloud services enable bigquery.googleapis.com --quiet26 ```27282. **Create a Dataset:**2930 ```bash31 bq mk --dataset --location=US my_dataset32 ```33343. **Create a Table:**3536 Create a file named `schema.json` with your table schema:3738 ```json39 [40 {41 "name": "name",42 "type": "STRING",43 "mode": "REQUIRED"44 },45 {46 "name": "post_abbr",47 "type": "STRING",48 "mode": "NULLABLE"49 }50 ]51 ```5253 Then create the table with the `bq` tool:5455 ```bash56 bq mk --table my_dataset.mytable schema.json57 ```58594. **Run a Query:**6061 ```bash62 bq query --use_legacy_sql=false \63 'SELECT name FROM `bigquery-public-data.usa_names.usa_1910_2013` \64 WHERE state = "TX" LIMIT 10'65 ```6667## Reference Directory6869- [Core Concepts](references/core-concepts.md): Storage types, analytics70 workflows, and BigQuery Studio features.7172- [CLI Usage](references/cli-usage.md): Essential `bq` command-line tool73 operations for managing data and jobs.7475- [Client Libraries](references/client-library-usage.md): Using Google Cloud76 client libraries for Python, Java, Node.js, and Go.7778- [MCP Usage](references/mcp-usage.md): Using the BigQuery remote MCP server and79 Gemini CLI extension.8081- [Infrastructure as Code](references/iac-usage.md): Terraform examples for82 datasets, tables, and reservations.8384- [IAM & Security](references/iam-security.md): Roles, permissions, and data85 governance best practices.8687*If you need product information not found in these references, use the88Developer Knowledge MCP server `search_documents` tool.*8990## Related Skills9192- [BigQuery AI & ML Skill](../bigquery-ai-ml):93 SKILL.md file for BigQuery AI and ML capabilities (forecast, anomaly94 detection, text generation).