bigquery-basics
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBigQuery Basics
BigQuery基础
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.
BigQuery是一款无服务器、支持AI的数据平台,可使用SQL和Python对大型数据集进行高速分析。其解耦架构将计算与存储分离,允许二者独立扩展,同时提供内置机器学习、地理空间分析和商业智能功能。
Setup and Basic Usage
设置与基础使用
-
Enable the BigQuery API:bash
gcloud services enable bigquery.googleapis.com -
Create a Dataset:bash
bq mk --dataset --location=US my_dataset -
Create a Table:Create a file namedwith your table schema:
schema.jsonjson[ { "name": "name", "type": "STRING", "mode": "REQUIRED" }, { "name": "post_abbr", "type": "STRING", "mode": "NULLABLE" } ]Then create the table with thetool:bqbashbq mk --table my_dataset.mytable schema.json -
Run a Query:bash
bq query --use_legacy_sql=false \ 'SELECT name FROM `bigquery-public-data.usa_names.usa_1910_2013` \ WHERE state = "TX" LIMIT 10'
-
启用BigQuery API:bash
gcloud services enable bigquery.googleapis.com -
创建数据集:bash
bq mk --dataset --location=US my_dataset -
创建表:创建一个名为的文件,定义您的表结构:
schema.jsonjson[ { "name": "name", "type": "STRING", "mode": "REQUIRED" }, { "name": "post_abbr", "type": "STRING", "mode": "NULLABLE" } ]然后使用工具创建表:bqbashbq mk --table my_dataset.mytable schema.json -
运行查询:bash
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: Essentialcommand-line tool operations for managing data and jobs.
bq -
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 tool.
search_documents-
核心概念:存储类型、分析工作流和BigQuery Studio功能。
-
CLI使用:用于管理数据和作业的命令行工具核心操作。
bq -
客户端库:使用Google Cloud客户端库进行Python、Java、Node.js和Go开发。
-
MCP使用:使用BigQuery远程MCP服务器和Gemini CLI扩展。
-
基础设施即代码:用于数据集、表和预留资源的Terraform示例。
-
IAM与安全:角色、权限和数据治理最佳实践。
如果您在这些参考资料中找不到所需的产品信息,请使用开发者知识MCP服务器的工具。
search_documentsRelated Skills
相关技能
- BigQuery AI & ML Skill: SKILL.md file for BigQuery AI and ML capabilities.
- BigQuery AI & ML References: Reference files published for the BigQuery AI and ML skill.
- BigQuery AI与ML技能:BigQuery AI和ML功能的SKILL.md文件。
- BigQuery AI与ML参考资料:为BigQuery AI和ML技能发布的参考文件。