bigquery-observability
Provides data-retrieval best practices, tool selection guidance, and performant SQL query syntax for BigQuery telemetry across INFORMATION_SCHEMA, Cloud Monitoring, and the REST API
Install / Use
npx skills add google/skills --skill bigquery-observabilityInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Our assessment of bigquery-observability
bigquery-observability scores 91/100 on our quality scale, 69th of 259 Operations skills we index (top 27%).
Its SKILL.md is 13 KB long, well organised into 12 sections and no code examples: a thorough specification that gives an agent plenty to work with.
With 20,340 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 2 days ago, so bigquery-observability is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands.
Automated pattern scan on 2026-09-26. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
bigquery-observability compared with similar skills
All 4 of these similar skills score higher than bigquery-observability; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| bigquery-observability (this skill)by google | 91 | 20.3k | 2d ago | SKILL.md |
| claude-memby thedotmack | 100 | 94.7k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 85.4k | 10d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 73.8k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 83.7k | today | MCP Server |
Frequently asked questions
- How do I install bigquery-observability?
- Run
npx skills add google/skills --skill bigquery-observability. The install tabs above show the steps for each supported agent. - Which AI agents does bigquery-observability work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is bigquery-observability safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. It is Apache-2.0-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is bigquery-observability still maintained?
- The repository was last updated 2 days ago, so bigquery-observability is actively maintained.
Skill content
View source on GitHubname: bigquery-observability metadata: version: v1 category: BigDataAndAnalytics description: >- Provides data-retrieval best practices, tool selection guidance, and performant SQL query syntax for BigQuery telemetry across INFORMATION_SCHEMA, Cloud Monitoring, and the REST API. Use when the telemetry to fetch is already known, selecting telemetry tools, writing performant INFORMATION_SCHEMA queries, retrieving telemetry for diagnosing single-job performance bottlenecks, investigating slot contention, job concurrency and queue latency, analyzing reservation capacity, utilization and autoscaling saturation, or auditing capacity-based and on-demand compute and storage resource billable usage. Don't use for root-cause diagnosis or symptom troubleshooting when the cause is unknown (use bigquery-troubleshooting first), or for writing or optimizing business logic SQL (use bigquery-optimization).
BigQuery Observability
Tool Selection
<!-- mdformat off -->| Tool | Primary Use Cases | Strengths & Capabilities | When to Avoid / Limitations |
| --- | --- | --- | --- |
| INFORMATION_SCHEMA (I_S) | Historical analysis, cohort comparison (normalized_literals), discovery of fast/slow windows, reservation/project timelines, multi-job aggregates, cost/billing tracing. | Flexible SQL querying across JOBS, JOBS_TIMELINE, and RESERVATIONS; supports custom time windows and grouping. | Avoid for high-frequency real-time polling or single-job point-lookups (can consume slots and take seconds to execute). |
| REST API (jobs.api / reservation.api) | Single-job point-lookup, real-time stage bottleneck diagnosis, automated pipeline status checks, reservation/capacity commitment configuration inspection (reservations.get, reservations.list). | Zero-SQL overhead, fast REST/CLI point-lookups (bq show -j, bq show --reservation), instant access to performanceInsights, queryPlan, and structural metadata. | Avoid for aggregate analysis across thousands of jobs, cross-project historical comparison, or system timeline aggregations. |
| Cloud Monitoring (Monarch / Charts) | Real-time alerting, fleet-wide dashboards, continuous slot utilization tracking, high-level SLA/SLO monitoring. | Out-of-the-box charts for slot utilization, query throughput, PENDING queue depth, and execution latency; low-latency alerting without running queries. | Avoid for SQL-level debugging, individual query text inspection, or stage-level execution detail. |
Prerequisites & Environment Setup
Before retrieving telemetry or running observability queries, ensure the Google Cloud environment and project are configured:
-
Google Cloud SDK: Ensure the Google Cloud SDK is installed and configured.
-
Project Selection: Set the active Google Cloud project:
gcloud config set project {project_id} -
API Enablement: Ensure the BigQuery and Cloud Monitoring APIs are enabled:
gcloud services enable bigquery.googleapis.com monitoring.googleapis.com -
Authentication: Authenticate the environment:
- CLI queries and
bqcommands:gcloud auth login - SDKs and automated client tools:
gcloud auth application-default login - Service accounts: Set
GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
- CLI queries and
-
Billing & IAM Roles:
- Verify an active Google Cloud Billing account is attached to
{project_id}. - Ensure appropriate IAM roles:
roles/bigquery.jobUser: Running telemetry queries.roles/bigquery.resourceViewerorroles/bigquery.admin: Organization-level jobs and reservation telemetry.roles/monitoring.viewer: Cloud Monitoring metrics.
- Verify an active Google Cloud Billing account is attached to
Workflow
-
Single-Job Point-Lookup (Zero-SQL Overhead): For single-job slowness or inspection, always prioritize the REST API or CLI (
bq show -j) first. It provides zero-SQL overhead and fast point-lookups for internal stage bottlenecks (performanceInsights,queryPlan, shuffle spill).bq show --location={location} -j {project_id}:{job_id} -
Diagnostic Transition Logic: If no job-level issues are found (e.g. no clear internal bottlenecks), the investigation should transition to system-level
INFORMATION_SCHEMAqueries (such asJOBS_TIMELINEorRESERVATIONS_TIMELINE) to check for broader issues like slot contention, queueing delay, or noisy neighbors.
Best Practices for Writing INFORMATION_SCHEMA Queries
Every query against a BigQuery INFORMATION_SCHEMA view must be qualified with
either a region qualifier or a dataset qualifier, optionally prefixed by
a project qualifier.
Qualification Syntax & Scope Matching
-
Region-Qualified Syntax:
`{project_id}`.`region-{region}`.INFORMATION_SCHEMA.{view}Example:
`my-project`.`region-us`.INFORMATION_SCHEMA.JOBSApplies to: Regional telemetry views (
JOBS*,JOBS_TIMELINE*,RESERVATIONS*,CAPACITY_COMMITMENTS*,TABLE_STORAGE*,STREAMING_TIMELINE*). The client query execution location MUST match theregion-{region}qualifier (or BigQuery throws:Not found: Table {project_id}:region-{region}.INFORMATION_SCHEMA.{view} was not found in location {location}). -
Dataset-Qualified Syntax:
`{project_id}`.`{dataset_id}`.INFORMATION_SCHEMA.{view}Example:
`my-project`.`analytics`.INFORMATION_SCHEMA.TABLESApplies to: Dataset-scoped views (
PARTITIONS,SEARCH_INDEXES*,ROW_ACCESS_POLICIES). Never useregion-with dataset views. -
Dual-Scoped Views: Views like
TABLES,COLUMNS,COLUMN_FIELD_PATHS,VIEWS,ROUTINES, andVECTOR_INDEXEScan be qualified with either{dataset_id}orregion-{region}depending on whether dataset or region-wide analysis is required. -
Project Qualifier (
{project_id}): Optional. If omitted, queries default to the project in which the query is executing. Specifying a project qualifier on organization-level views (e.g.JOBS_BY_ORGANIZATION) has no impact on results.
Principle of Least Privilege & Scope Selection
When constructing INFORMATION_SCHEMA queries, always select the scope and
view variant with the least IAM permission requirement that satisfies the
analytical need:
- User-Level over Project-Level (
_BY_USER): When diagnosing queries or sessions executed by the current user, use_BY_USER(e.g.JOBS_BY_USER,SESSIONS_BY_USER). This requires onlybigquery.jobs.list(granted viaroles/bigquery.userorroles/bigquery.jobUser), avoiding the need forbigquery.jobs.listAllorroles/bigquery.admin. - Dataset-Level over Region/Project-Level: When querying table metadata,
columns, or views for a specific dataset, qualify with
{dataset_id}rather thanregion-{region}when project-level metadata access is restricted. Dataset-scoped queries require permissions only on that target dataset. - Project-Level over Org/Folder-Level (
_BY_PROJECT): Always start with project-scoped views before escalating to_BY_FOLDERor_BY_ORGANIZATION. Folder and organization queries require broad folder/org IAM permissions (bigquery.jobs.listAllorbigquery.tables.listat the Org/Folder node). - Metadata Roles over Data Roles: For table and storage introspection,
prefer
roles/bigquery.metadataViewer(which providesbigquery.tables.getandbigquery.tables.list) overroles/bigquery.dataViewerorroles/bigquery.dataOwnerwhen data read access (bigquery.tables.getData) is not needed. (Note:INFORMATION_SCHEMA.PARTITIONSuniquely requiresbigquery.tables.getData).
Execution Guardrails & Query Invariants
- Mandatory Partition & Time Filtering: Always filter on
creation_time(e.g.,creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 3 DAY)) orusage_dateto avoid full metadata table scans. - Script Wrapper Exclusion: Add
AND (statement_type != 'SCRIPT' OR statement_type IS NULL)when aggregating compute spend to avoid double-counting parent scripts and child jobs. - Column Pruning: Never use
SELECT *againstINFORMATION_SCHEMA; only project required columns. - Dry Run & Cost Estimation: Use a dry run (
bq query --dry_run --use_legacy_sql=false "{query}"or APIdryRun=true) before executing complex queries, multi-view joins, or large scans to validate syntax and estimatetotalBytesProcessedat zero cost. - Empty Regional Scope (0 Rows): If the execution location matches the qualifier, but the project has no datasets or jobs in that region, the query succeeds and returns 0 rows. Never assume 0 rows means 0 usage—always verify the target dataset locations.
- Non-Hierarchical Region Scope: Region qualifiers are not hierarchical.
Multi-regions do not encompass single regions (e.g.
region-usreturns only multi-regionUSmetadata and does not include single regions likeregion-us-central1). - No Multi-Region Aggregation in SQL: Region qualifiers cannot be joined
cross-region in a single query (e.g.
region-uscannot joinregion-eu). - Uncached Execution & Minimum Scan Size:
INFORMATION_SCHEMAquery results are never cached. On-demand queries incur a minimum of 10 MB of data processing charges per execution.
Domain References & SQL Queries
Telemetry Query Guides
- On-Demand Compute: Billed Bytes
(
references/compute_ondemand_billable.md): Authoritative Golden CTE (bytes_billed_cte), timezone-aligned billing date extraction (PST8PDT), BQML CREATE_MODEL 50x multiplier rules, script wrapper deduplication, and row-level security (RLS) masking checks. - Capacity Compute: Billable Slots & Commitments
(
references/compute_capacity_billable.md): Query templates for auditing billable capacity hours across 1-Year/3-Year commitments, uncovered baseline PAYG slots, and dynamic autoscaling hours. - Storage Footprints & Usage (Bytes Stored)
(
references/storage_footprints.md): Storage snapshot queries, compression ratio calculations, Time Travel / Fail-Safe churn, daily average GiB time-integrals, and billing model evaluation.
Performance & Troubleshooting Guides
- Job Performance Queries (
references/job_performance_queries.md): Queries for evaluating individual and aggregate job performance, stage bottleneck flags, comparable jobs via normalized literals (query_info.query_hashes.normalized_literals), BI Engine acceleration, metadata cache (cmeta) acceleration, and execution variance outliers. - Resource Contention Queries
(
references/resource_contention_queries.md): Queries for diagnosing slot contention, queue latency, per-minute concurrency/queue timelines, and 1-second reservation slot saturation. - Capacity & Configuration Queries
(
references/capacity_and_configuration_queries.md): Queries for evaluating second-by-second baseline/max capacity ceilings, autoscaling saturation timelines, and auditing configuration changes (RESERVATION_CHANGES_BY_PROJECT,ASSIGNMENT_CHANGES_BY_PROJECT).
Schema Dictionaries (Column Definitions & Units)
- Compute & Capacity Schema Dictionary (
references/schema_compute.md): Complete column dictionary, physical units, and least-privilege IAM roles for all compute, job, session, reservation, capacity commitment, and assignment views (JOBS*,JOBS_TIMELINE*,SESSIONS_BY_USER,SESSIONS_BY_PROJECT,RESERVATIONS*, `RESERVATION_CHAN
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
94.7kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
85.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
73.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
83.7k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
