database-bigquery

Run SQL queries and inspect datasets, tables, and schemas in Google BigQuery.

656|82|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/incidentfox/incidentfox --skill database-bigquery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-bigquery
Source: https://github.com/incidentfox/incidentfox/tree/main/sre-agent/.claude/skills/database-bigquery
Command: npx skills add https://github.com/incidentfox/incidentfox --skill database-bigquery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires google-cloud-bigquery, and includes scripts (resource) components.

What problem does it solve?

Investigating data in Google BigQuery requires knowing which datasets and tables exist before writing queries, and manually exploring schemas through the console slows down incident analysis and data exploration.

Core Features & Use Cases

  • Schema-First Discovery: List datasets, list tables within a dataset, and inspect table schemas including row counts, sizes, and column types before writing any SQL.
  • SQL Query Execution: Run arbitrary BigQuery Standard SQL queries with configurable default datasets and row limits, returning structured JSON results.
  • Transparent Authentication: Credentials are injected by a proxy layer, so scripts run directly without manual service account setup.
  • Use Case: During an incident investigation, list available datasets, find the events table, inspect its schema, then query the last 24 hours of error logs to identify the root cause.

Quick Start

Ask the agent to list all BigQuery datasets and then run a SQL query against a specific table to inspect recent rows.

Frequently Asked Questions about database-bigquery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a SQL query on Google BigQuery from Python?

Use the query.py script with the --query flag containing your Standard SQL statement. It uses the google-cloud-bigquery client to execute the query and returns rows, schema, and total row counts as JSON, with an optional --max-results limit defaulting to 1000.

How do I list datasets and tables in BigQuery?

Run list_datasets.py to enumerate all datasets in the configured project, then run list_tables.py with --dataset to see tables in a specific dataset including row counts, sizes, and creation timestamps.

How do I inspect a BigQuery table schema before querying?

Run get_table_schema.py with --dataset and --table arguments. It returns each column's name, type, mode, and description along with the table's total row count and byte size.

Does BigQuery authentication require a service account key file?

No manual credential setup is needed because credentials are injected transparently by a proxy layer. If BIGQUERY_SERVICE_ACCOUNT_KEY is present it is used directly, otherwise the default client credentials apply. Only BIGQUERY_PROJECT_ID must be configured.

Why should I list schemas before writing BigQuery queries?

The skill enforces a schema-first workflow because querying unknown tables wastes compute and produces errors. Listing datasets, tables, and schemas first ensures queries reference valid columns and can use partition filters for cost efficiency.