Latest upstream author date included at this registry's pinned revision.

bigquery-basics

Synced v1.0.0 License: Apache-2.0 Source: google/skills/skills/cloud/bigquery-basics Commit: 99c871e Latest included change:

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.

Summary

Purpose
Guides basic BigQuery setup and the use of SQL to analyze large datasets.
When to use
Use it when you need examples for enabling the BigQuery API, creating a dataset or table, or running a SQL query.
Outputs
It provides setup commands, a sample table schema, and example SQL for querying data.
Upstream changes (16, latest included 2026-09-21)
becc4b8 Enforce semantic versioning (MAJOR.MINOR.PATCH) for skills. Added version 1.0.0 under the skill's metadata front matter.
0ecc2fc Update bigquery-basics skill with standardized metrics tracking (agent-skills). Added attribution guidance for directly executed gcloud commands and BigQuery HTTP/MCP requests, and updated the gcloud example with the attribution variable.
e08ada0 Add documentation for BigQuery continuous queries to the BigQuery agent skills. Added a reference link for BigQuery continuous queries and real-time SQL analysis.
6617ca7 Add documentation for BigQuery Change History to the BigQuery agent skills. Added a Change History reference covering APPENDS and CHANGES for incremental table 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 Added a metadata front-matter block and moved the BigDataAndAnalytics category under it.
872e31b Refactor BQ skills Narrowed the skill description to basic BigQuery tasks, removed several AI/ML reference entries, and changed the related AI & ML skill link to a relative path.
31c6adb Adding BQ AI generate reference Added an AI Generate reference and removed the AI Generate file from the related AI/ML reference list.
14a8f36 Adding BQ AI anomaly detection reference Added an AI Detect Anomalies reference and removed its file from the related AI/ML reference list.
d59d0e2 Upload BigQuery AI.FORECAST skill Added an AI Forecast reference and reformatted the related AI/ML reference list while removing its forecast file entry.
626910e Update gcloud examples to use --quiet. Added the --quiet flag to the gcloud API-enablement example.
6f0b877 Nests cloud/ skills under a top level skills/ directory Renamed the skill file from cloud/bigquery-basics/SKILL.md to skills/cloud/bigquery-basics/SKILL.md without content changes.
9114a94 Flatten skill directories to work with multiple installation tools Renamed the skill file from cloud/products/bigquery/bigquery-basics/SKILL.md to cloud/bigquery-basics/SKILL.md without content changes.
9b3ff7f No public description Changed the document heading from BigQuery Guide to BigQuery Basics.
1b57cb4 No public description Changed the skill's front-matter name from bigquery to bigquery-basics.
4e36357 No public description Updated the six reference links to use paths relative to the skill directory.
2f4998e No public description Added the initial BigQuery skill guide with setup and query instructions and links to reference documentation and related AI/ML resources.
npx skills add "lettucebo/Skills#v2.2.0@bigquery-basics" --full-depth

⚠ Available after v2.2.0 is published

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

History

v1.0.0 mapping-added 99c871e