database-bigquery

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

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill database-bigquery-erwinv2k-tkg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-bigquery
Source: https://github.com/erwinv2k-TKG/AgentesVSC/tree/main/packs/incidentfox/sre-agent/.claude/skills/database-bigquery
Command: npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill database-bigquery-erwinv2k-tkg

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Investigating data in Google BigQuery normally requires switching to the console or writing ad-hoc client code. This Skill lets an AI agent list datasets, enumerate tables, inspect schemas, and execute SQL queries directly through ready-made Python scripts, with credentials injected transparently by a proxy layer. ## Core Features & Use Cases - Schema-First Discovery: Enforces a list datasets → list tables → get schema → query workflow so queries are written against verified structures. - SQL Query Execution: Runs Standard SQL queries with optional default dataset and configurable max result limits, returning JSON-formatted rows and schema metadata. - Table Metadata Inspection: Reports row counts, byte sizes, column types, modes, and descriptions for any table. - Use Case: During an incident investigation, ask the agent to find which tables exist in the analytics dataset, inspect the events table schema, and query the last 24 hours of error events to correlate with an alert. ## Quick Start Ask the agent to list the available BigQuery datasets and then run a SQL query against a table you specify.

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 BigQuery from Python?

Use the query.py script with a --query argument containing your Standard SQL statement. It uses the google-cloud-bigquery client, supports an optional default dataset and --max-results limit, and prints rows plus schema as JSON.

How do I list datasets and tables in BigQuery?

Run list_datasets.py to enumerate all datasets in the configured project, then list_tables.py --dataset DATASET_ID to see tables with row counts, sizes, and timestamps. This discovery step is required before writing queries.

How do I get a BigQuery table schema programmatically?

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 row count and byte size as JSON.

Do I need to set BIGQUERY_SERVICE_ACCOUNT_KEY for authentication?

No. Credentials are injected transparently by a proxy layer, so the scripts work without the key in your environment. You only need BIGQUERY_PROJECT_ID set, and optionally BIGQUERY_DATASET as a default dataset.

Why does my BigQuery query fail with a dataset error?

Queries fail when the default dataset is not configured or table references are unqualified. Pass --dataset to query.py, set BIGQUERY_DATASET, or use fully qualified project.dataset.table names in your SQL.