此注册表固定版本所收录的最新上游作者日期。

bigquery-basics

已同步 v1.0.0 许可证: Apache-2.0 来源: google/skills/skills/cloud/bigquery-basics 提交: 99c871e 收录的最新变更:

Manages datasets, tables, and jobs in BigQuery. Use when you need to interact with BigQuery, run SQL queries, manage BigQuery resources (datasets, tables, views), or perform basic data ingestion and analysis.

摘要

用途
说明 BigQuery 的基本设置方式,以及如何使用 SQL 分析大型数据集。
使用时机
需要激活 BigQuery API、创建数据集或数据表,或运行 SQL 查找的范例时使用。
输出结果
提供设置指令、数据表结构范例与查找数据的 SQL 范例。
上游变更(16 条,最新收录 2026-09-21)
becc4b8 Enforce semantic versioning (MAJOR.MINOR.PATCH) for skills. 在技能的 metadata 前置数据中添加版本 1.0.0。
0ecc2fc Update bigquery-basics skill with standardized metrics tracking (agent-skills). 添加直接运行的 gcloud 指令及 BigQuery HTTP/MCP 请求的归因指引,并在 gcloud 范例中加入归因环境变量。
e08ada0 Add documentation for BigQuery continuous queries to the BigQuery agent skills. 添加 BigQuery 连续查找及实时 SQL 分析的参考文档链接。
6617ca7 Add documentation for BigQuery Change History to the BigQuery agent skills. 添加变更历史参考文档,说明如何使用 APPENDS 和 CHANGES 追踪增量数据表变更。
c75b500 Restructure the YAML frontmatter in all SKILL.md files to nest the 'category' field under the 'metadata:' block. The 'category' field is used to organize the skills in the README.md 添加 metadata 前置数据区块,并将 BigDataAndAnalytics 类别移至其中。
872e31b Refactor BQ skills 将技能描述限缩为 BigQuery 基本工作,移除多个 AI/ML 参考项目,并将相关 AI 与 ML 技能链接改为相对路径。
31c6adb Adding BQ AI generate reference 添加 AI Generate 参考项目,并从相关 AI/ML 参考清单移除 AI Generate 文件项目。
14a8f36 Adding BQ AI anomaly detection reference 添加 AI Detect Anomalies 参考项目,并从相关 AI/ML 参考清单移除其文件项目。
d59d0e2 Upload BigQuery AI.FORECAST skill 添加 AI Forecast 参考项目,重新排版相关 AI/ML 参考清单,并移除其中的 forecast 文件项目。
626910e Update gcloud examples to use --quiet. 在激活 API 的 gcloud 范例中加入 --quiet 旗标。
6f0b877 Nests cloud/ skills under a top level skills/ directory 将技能文件从 cloud/bigquery-basics/SKILL.md 移至 skills/cloud/bigquery-basics/SKILL.md,内容未变更。
9114a94 Flatten skill directories to work with multiple installation tools 将技能文件从 cloud/products/bigquery/bigquery-basics/SKILL.md 移至 cloud/bigquery-basics/SKILL.md,内容未变更。
9b3ff7f No public description 将文档标题从 BigQuery Guide 改为 BigQuery Basics。
1b57cb4 No public description 将技能前置数据中的名称从 bigquery 改为 bigquery-basics。
4e36357 No public description 将六个参考文档链接更新为相对于技能目录的路径。
2f4998e No public description 添加 BigQuery 技能指南初版,包含设置与查找说明,以及参考文档和相关 AI/ML 资源链接。
npx skills add "lettucebo/Skills#v2.2.0@bigquery-basics" --full-depth

⚠ v2.2.0 发布后即可使用

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.

Attribution

Tag every BigQuery command you execute directly in the terminal while using this skill, so usage can be attributed. The tag identifies only the skill and its version; it carries no user data.

  • Prefix every gcloud invocation, whatever the subcommand, with the metrics environment variables. Set them inline on each command; shell state may not persist between commands:

    CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:bigquery-basics)" \
    gcloud <command> [flags]
    

    Do not use gcloud config set for this: it would persist beyond the current task and mislabel unrelated usage.

  • On direct HTTP calls to the BigQuery APIs (for example with curl) or HTTP requests to the MCP server, append this exact string to the end of the existing User-Agent header — the collection pipeline parses the agent-skills/<version> and skill:<name> tokens, so any rewording breaks attribution:

    User-Agent: <existing_user_agent> agent-skills/1.0 (skill:bigquery-basics)
    
  • Constraint for Generated Code: The tracking prefix is strictly for commands you execute directly in the terminal. Do NOT include this tracking prefix in generated scripts, Terraform templates, or code provided to the user for their own repositories.

Setup and Basic Usage

  1. Enable the BigQuery API:

    CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:bigquery-basics)" \
    gcloud services enable bigquery.googleapis.com --quiet
    
  2. Create a Dataset:

    bq mk --dataset --location=US my_dataset
    
  3. 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
    
  4. 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.

  • Change History: Tracking and querying incremental table changes using APPENDS and CHANGES.

  • Continuous Queries: Running continuous SQL statements to analyze incoming data in real time.

  • 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).

历史

v1.0.0 mapping-added 99c871e