此登錄庫釘選版本所收錄的最新上游作者日期。

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