Skip to content
BigQuery Basics

BigQuery Basics

Apache-2.0
Repository Docs
markdown Development
google-cloudbigquerysqlanalyticsdata

Summary

Google's official BigQuery skill — datasets, tables, jobs and SQL from the bq CLI, plus the reference set for IAM, Terraform, change history and continuous queries.

Features

  • Correct `bq` CLI syntax for datasets, tables and query jobs
  • Reference set covering IAM, governance and Terraform resources
  • Change history via APPENDS/CHANGES and continuous streaming queries
  • Client-library guidance for Python, Java, Node.js and Go

Install This Skill

Add this skill to your favorite AI agent in a few steps.

Any AI agent

This skill is plain instructions — it works with any assistant that accepts custom instructions or system prompts.

  1. Copy the skill content with the button below.
  2. Paste it into your agent's instruction file or system prompt (for example AGENTS.md, .cursorrules, or a custom instructions field).
  3. Ask the agent to apply the skill whenever the task matches.

Skill Content

Markdown Content

Copy this content and use it with your preferred AI agent

---
name: bigquery-basics
metadata:
  category: BigDataAndAnalytics
description: >-
  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 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.

## Setup and Basic Usage

1.  **Enable the BigQuery API:**

    ```bash
    gcloud services enable bigquery.googleapis.com --quiet
    ```

2.  **Create a Dataset:**

    ```bash
    bq mk --dataset --location=US my_dataset
    ```

3.  **Create a Table:**

    Create a file named `schema.json` with your table schema:

    ```json
    [
      {
        "name": "name",
        "type": "STRING",
        "mode": "REQUIRED"
      },
      {
        "name": "post_abbr",
        "type": "STRING",
        "mode": "NULLABLE"
      }
    ]
    ```

    Then create the table with the `bq` tool:

    ```bash
    bq mk --table my_dataset.mytable schema.json
    ```

4.  **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'
    ```

## Reference Directory

- [Core Concepts](references/core-concepts.md): Storage types, analytics
  workflows, and BigQuery Studio features.

- [Change History](references/change-history.md): Tracking and querying
  incremental table changes using APPENDS and CHANGES.

-   [Continuous Queries](references/continuous-queries.md): Running continuous
    SQL statements to analyze incoming data in real time.

- [CLI Usage](references/cli-usage.md): Essential `bq` command-line tool
  operations for managing data and jobs.

- [Client Libraries](references/client-library-usage.md): Using Google Cloud
  client libraries for Python, Java, Node.js, and Go.

- [MCP Usage](references/mcp-usage.md): Using the BigQuery remote MCP server and
  Gemini CLI extension.

- [Infrastructure as Code](references/iac-usage.md): Terraform examples for
  datasets, tables, and reservations.

- [IAM & Security](references/iam-security.md): 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](../bigquery-ai-ml):
  SKILL.md file for BigQuery AI and ML capabilities (forecast, anomaly
  detection, text generation).

Usage Instructions

Learn how to use this skill with different AI agents.

Generic Instructions

Install from the official Google skills repository:

npx skills add google/skills --skill bigquery-basics

Or install the whole repository and choose interactively:

npx skills add google/skills

Example Usage

"Create a BigQuery dataset in the US multi-region, load this CSV into a partitioned table, and show me the top 10 rows by revenue."

Description

BigQuery has an unusually wide surface: the bq CLI, the SQL dialect, client libraries in four languages, Terraform resources, reservations, IAM roles and a governance model that all have to line up before a query runs. That is precisely the sort of territory where an agent produces plausible commands that fail.

This official skill from Google's own skills repository grounds the agent in the working set: enabling the API, creating datasets and tables from a JSON schema, running standard-SQL queries, and then a reference directory that covers storage types and BigQuery Studio, incremental change tracking with APPENDS and CHANGES, continuous queries over streaming data, client-library usage for Python, Java, Node.js and Go, Terraform for datasets, tables and reservations, and IAM roles and data-governance practice.

Use it when an agent needs to interact with BigQuery rather than write about it — building ingestion, standing up analytics, or reviewing someone else's dataset layout. It pairs with the BigQuery AI & ML skill in the same repository for forecasting, anomaly detection and text generation inside SQL.

Related Skills

Skill: Genkit for JavaScript

by Genkit (Google)

New

The official Genkit skill for Node.js and TypeScript — flows, Dotprompt files, tools and the beta agent API with sessions, interrupts and branching.

Development

Skill: Superpowers

by Jesse Vincent

New

An agentic software-development methodology: composable skills that push a coding agent through spec, plan, TDD and review instead of straight into code.

Development

Skill: SkillHone

by Tencent

New

Tencent's skill-evolution harness: it rewrites a whole skill folder — SKILL.md, scripts and references together — and lands every decision as a real Git issue, PR and wiki entry you can review.

Development

Skill: OpenSearch Launchpad

by OpenSearch Project

New

Take an OpenSearch search application from requirements to a running cluster — BM25, dense and sparse vectors, hybrid retrieval, agentic search and RAG, with relevance evaluation built in.

Development
2 views
Browse all skills →