跳到正文
Skillpedia
数据库22k · #10225

bigquery-basics

它能做什么

这个技能帮你使用 Google 的大型数据仓库 BigQuery。它适用于需要存储、加载和查询数据,又不想自己管理服务器的人。

适用场景

  • ✓当你想创建或管理 BigQuery 数据集、表或视图的时候。
  • ✓当你需要对 BigQuery 数据运行 SQL 查询的时候。
  • ✓当你想用基本命令加载或分析 BigQuery 中的数据集的时候。

技能链接

https://github.com/google/skills/blob/main/skills/cloud/bigquery-basics/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/google/skills/blob/main/skills/cloud/bigquery-basics/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为我的销售数据创建一个 BigQuery 数据集,把 CSV 文件加载进去,然后对它运行一次查询。”

每周 5 个新技能,1 分钟读完。

工作原理

它使用 bq 命令行工具和 SQL 来创建资源、加载数据并进行分析。它会先确认 BigQuery API 已开启。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:bigquery-basics)" and append agent-skills/1.0 (skill:bigquery-basics) to User-Agent headers.

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.

  • Usage Attribution: Standardized usage attribution tags for gcloud CLI, REST API, and MCP requests.

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).
常见问题

我需要设置服务器吗?

不需要。BigQuery 是无服务器的,所以无需管理任何东西。

我需要先开启 API 吗?

需要。必须在你的 Google Cloud 项目中启用 BigQuery API。

我也可以用 Python 吗?

可以。BigQuery 既可以用 SQL 也可以用 Python 进行分析。

详情

作者的原始描述

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.

repo: google/skills

热度

GitHub 星标
22k
排名
#10225
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能