Generated banner for Bigquery Observability
Generated logo for Bigquery Observability

Bigquery Observability

GoogleOfficialPublished by Google

  • Skill
  • Tool integration
  • Data and AI
  • Apache-2.0
  • No issues found

From the author

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).
— the description by Google

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

BigQuery Observability offers a structured approach to monitoring and analyzing BigQuery performance and resource usage. It guides users in selecting the right telemetry tools—ranging from INFORMATION_SCHEMA for historical analysis to the REST API for real-time job lookups—and provides optimized SQL templates for auditing compute, storage, and capacity. The skill emphasizes efficient data retrieval, least-privilege access, and performance guardrails to ensure accurate telemetry without unnecessary overhead.

What it does

  • Provides SQL query templates for INFORMATION_SCHEMA views.
  • Offers guidance on choosing between INFORMATION_SCHEMA, Cloud Monitoring, and REST APIs.
  • Includes best practices for performant telemetry retrieval and cost management.
  • Details schema dictionaries for compute, storage, and capacity metrics.
  • Defines workflows for diagnosing job bottlenecks and resource contention.
  • Enforces usage attribution for all Google Cloud CLI and API interactions.

When to use it

  • When you need to audit billable compute or storage resource usage.
  • When investigating job performance bottlenecks or slot contention.
  • When analyzing reservation capacity, utilization, or autoscaling saturation.
  • When you need to perform historical analysis or cohort comparisons of jobs.
  • When selecting the appropriate telemetry tool for real-time vs. historical monitoring.

Advantages

  • Reduces query overhead by providing optimized, partition-filtered SQL patterns.
  • Ensures least-privilege access by recommending specific view variants.
  • Standardizes diagnostic workflows across single-job and system-level issues.
  • Provides clear guidance on avoiding common pitfalls like full metadata scans.

Usage examples

“How do I check for slot contention in my BigQuery project?”
The agent provides a query template using the JOBS_TIMELINE view, filtered by the relevant time window, to identify periods of high slot usage and queue latency.
“I need to audit my on-demand compute spend for the last 30 days.”
The agent provides a structured SQL query using INFORMATION_SCHEMA.JOBS, including logic to deduplicate script wrappers and calculate billable bytes.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/google/bigquery-observability/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip bigquery-observability.zip -d .agents/skills

Documentation by Google

BigQuery Observability

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:bigquery-observability)" and append agent-skills/1.0 (skill:bigquery-observability) to User-Agent headers.

Tool Selection

<!-- mdformat off -->

ToolPrimary Use CasesStrengths & CapabilitiesWhen 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 (Metrics Explorer / 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.

<!-- mdformat on -->

Prerequisites & Environment Setup

Before retrieving telemetry or running observability queries, ensure the Google Cloud environment and project are configured:

  1. Google Cloud SDK: Ensure the Google Cloud SDK is installed and configured.

  2. Project Selection: Set the active Google Cloud project:

    gcloud config set project {project_id}
  3. API Enablement: Ensure the BigQuery and Cloud Monitoring APIs are enabled:

    gcloud services enable bigquery.googleapis.com monitoring.googleapis.com
  4. Authentication: Authenticate the environment:

    • CLI queries and bq commands: gcloud auth login

    • SDKs and automated client tools: gcloud auth application-default login

    • Service accounts: Set GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"

  5. 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.resourceViewer or roles/bigquery.admin: Organization-level jobs and reservation telemetry.

      • roles/monitoring.viewer: Cloud Monitoring metrics.

  6. Companion Skills Installation: This skill is part of a 3-pillar operations suite (bigquery-observability, bigquery-optimization, bigquery-troubleshooting). If any companion skill is not yet installed in your environment, install the full suite:

    npx skills add google/skills --skill bigquery-observability --skill bigquery-optimization --skill bigquery-troubleshooting

Workflow

  1. 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}
  2. Diagnostic Transition Logic: If no job-level issues are found (e.g. no clear internal bottlenecks), the investigation should transition to system-level INFORMATION_SCHEMA queries (such as JOBS_TIMELINE or RESERVATIONS_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
  1. Region-Qualified Syntax:

    `{project_id}`.`region-{region}`.INFORMATION_SCHEMA.{view}

    Example: `my-project`.`region-us`.INFORMATION_SCHEMA.JOBS

    Applies to: Regional telemetry views (JOBS*, JOBS_TIMELINE*, RESERVATIONS*, CAPACITY_COMMITMENTS*, TABLE_STORAGE*, STREAMING_TIMELINE*). The client query execution location MUST match the region-{region} qualifier (or BigQuery throws: Not found: Table {project_id}:region-{region}.INFORMATION_SCHEMA.{view} was not found in location {location}).

  2. Dataset-Qualified Syntax:

    `{project_id}`.`{dataset_id}`.INFORMATION_SCHEMA.{view}

    Example: `my-project`.`analytics`.INFORMATION_SCHEMA.TABLES

    Applies to: Dataset-scoped views (PARTITIONS, SEARCH_INDEXES*, ROW_ACCESS_POLICIES). Never use region- with dataset views.

  3. Dual-Scoped Views: Views like TABLES, COLUMNS, COLUMN_FIELD_PATHS, VIEWS, ROUTINES, and VECTOR_INDEXES can be qualified with either {dataset_id} or region-{region} depending on whether dataset or region-wide analysis is required.

  4. 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:

  1. 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 only bigquery.jobs.list (granted via roles/bigquery.user or roles/bigquery.jobUser), avoiding the need for bigquery.jobs.listAll or roles/bigquery.admin.

  2. Dataset-Level over Region/Project-Level: When querying table metadata, columns, or views for a specific dataset, qualify with {dataset_id} rather than region-{region} when project-level metadata access is restricted. Dataset-scoped queries require permissions only on that target dataset.

  3. Project-Level over Org/Folder-Level (_BY_PROJECT): Always start with project-scoped views before escalating to _BY_FOLDER or _BY_ORGANIZATION. Folder and organization queries require broad folder/org IAM permissions (bigquery.jobs.listAll or bigquery.tables.list at the Org/Folder node).

  4. Metadata Roles over Data Roles: For table and storage introspection, prefer roles/bigquery.metadataViewer (which provides bigquery.tables.get and bigquery.tables.list) over roles/bigquery.dataViewer or roles/bigquery.dataOwner when data read access (bigquery.tables.getData) is not needed. (Note: INFORMATION_SCHEMA.PARTITIONS uniquely requires bigquery.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)) or usage_date to 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 * against INFORMATION_SCHEMA; only project required columns.

  • Dry Run & Cost Estimation: Use a dry run (bq query --dry_run --use_legacy_sql=false "{query}" or API dryRun=true) before executing complex queries, multi-view joins, or large scans to validate syntax and estimate totalBytesProcessed at 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-us returns only multi-region US metadata and does not include single regions like region-us-central1).

  • No Multi-Region Aggregation in SQL: Region qualifiers cannot be joined cross-region in a single query (e.g. region-us cannot join region-eu).

  • Uncached Execution & Minimum Scan Size: INFORMATION_SCHEMA query 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, billing model evaluation, and search index coverage.

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, search index usage, materialized view rewrite usage, 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_CHANGES*, RESERVATIONS_TIMELINE*, CAPACITY_COMMITMENTS*, CAPACITY_COMMITMENT_CHANGES_BY_PROJECT, ASSIGNMENTS*, ASSIGNMENT_CHANGES_BY_PROJECT).

  • Storage & Data Catalog Schema Dictionary (references/schema_storage.md): Complete column dictionary, physical units, and least-privilege IAM roles for all table storage, partition, column, snapshot, dataset, constraint, and replication views (TABLE_STORAGE*, TABLE_STORAGE_USAGE_TIMELINE*, TABLES*, TABLE_OPTIONS, COLUMNS, COLUMN_FIELD_PATHS, PARTITIONS, VIEWS, MATERIALIZED_VIEWS, TABLE_SNAPSHOTS*, TABLE_CONSTRAINTS, KEY_COLUMN_USAGE, SCHEMATA*, SCHEMATA_OPTIONS, SCHEMATA_REPLICAS*, SCHEMATA_LINKS, SHARED_DATASET_USAGE).

  • Platform, Governance & Ingestion Schema Dictionary (references/schema_others.md): Complete column dictionary, physical units, and least-privilege IAM roles for all remaining views including Access Control (OBJECT_PRIVILEGES, ROW_ACCESS_POLICIES, ROW_ACCESS_POLICY_OPTIONS), Streaming Ingestion (STREAMING_TIMELINE_BY_PROJECT*, WRITE_API_TIMELINE_BY_PROJECT*), Configuration Options (PROJECT_OPTIONS*, EFFECTIVE_PROJECT_OPTIONS, ORGANIZATION_OPTIONS*, ORGANIZATION_OPTIONS_CHANGES), Insights & Recommendations (RECOMMENDATIONS*, INSIGHTS), and Indexes/BI Engine/Routines (SEARCH_INDEXES*, SEARCH_INDEX_COLUMNS, SEARCH_INDEX_OPTIONS, VECTOR_INDEXES*, VECTOR_INDEX_COLUMNS, VECTOR_INDEX_OPTIONS, BI_CAPACITIES, BI_CAPACITY_CHANGES, ROUTINES*, ROUTINE_OPTIONS, PARAMETERS).

Files

references/schema_storage.md

BigQuery Storage & Catalog INFORMATION_SCHEMA Reference

A comprehensive dictionary, column definition guide, and physical unit specification for all Storage, Table, Column, Partition, Snapshot, and Dataset views in BigQuery INFORMATION_SCHEMA.

Table of Contents

  • View Scoping & Qualification Matrix (Lines 47-62)

  • 3. Storage Footprint, Partitions & Table Metadata Views (Lines 63-434)

    • INFORMATION_SCHEMA.TABLE_STORAGE_USAGE_TIMELINE (and _BY_PROJECT, _BY_ORGANIZATION, _BY_FOLDER) (Lines 65-114)

    • INFORMATION_SCHEMA.TABLE_STORAGE (and _BY_PROJECT, _BY_ORGANIZATION, _BY_FOLDER) (Lines 115-166)

    • INFORMATION_SCHEMA.TABLES (and _BY_PROJECT) (Lines 167-213)

    • INFORMATION_SCHEMA.TABLE_OPTIONS (Lines 214-241)

    • INFORMATION_SCHEMA.TABLE_SNAPSHOTS (and _BY_PROJECT) (Lines 242-268)

    • INFORMATION_SCHEMA.PARTITIONS (Lines 269-300)

    • INFORMATION_SCHEMA.COLUMNS (Lines 301-345)

    • INFORMATION_SCHEMA.COLUMN_FIELD_PATHS (Lines 346-378)

    • INFORMATION_SCHEMA.VIEWS (Lines 379-405)

    • INFORMATION_SCHEMA.MATERIALIZED_VIEWS (Lines 406-434)

  • 4. Datasets, Replication & Sharing Views (Lines 435-619)

    • INFORMATION_SCHEMA.SCHEMATA (Lines 437-466)

    • INFORMATION_SCHEMA.SCHEMATA_OPTIONS (Lines 467-492)

    • INFORMATION_SCHEMA.SCHEMATA_REPLICAS (and _BY_FAILOVER_RESERVATION) (Lines 493-527)

    • INFORMATION_SCHEMA.SCHEMATA_LINKS & SHARED_DATASET_USAGE (Lines 528-559)

    • INFORMATION_SCHEMA.TABLE_CONSTRAINTS (Lines 560-589)

    • INFORMATION_SCHEMA.KEY_COLUMN_USAGE (Lines 590-619)

View Scoping & Qualification Matrix

Storage, table, and dataset views fall into Dual-Scoped, Region-Only, and Dataset-Only qualification categories:

<!-- mdformat off -->

View FamilyINFORMATION_SCHEMA View(s)Qualification ScopeSyntax Pattern & Scoping Rules
Storage FootprintsTABLE_STORAGE* (_BY_PROJECT, _BY_FOLDER, _BY_ORGANIZATION), TABLE_STORAGE_USAGE_TIMELINE*Region-Only `{project_id}`.`region-{region}`.INFORMATION_SCHEMA.TABLE_STORAGE*<br>• Storage billing models (Logical vs Physical) and daily usage integrals (MiB * seconds).
Tables & MetadataTABLES, TABLE_OPTIONS, COLUMNS, COLUMN_FIELD_PATHS, VIEWS, MATERIALIZED_VIEWSDual-Scoped `{project_id}`.`region-{region}`.INFORMATION_SCHEMA.{view_name}<br>OR<br> `{project_id}`.`{dataset_id}`.INFORMATION_SCHEMA.{view_name}
Table PartitionsPARTITIONSDataset-Only `{project_id}`.`{dataset_id}`.INFORMATION_SCHEMA.PARTITIONS<br>• Partition boundaries and storage tiers. Must be qualified with {dataset_id}.
Table SnapshotsTABLE_SNAPSHOTS* (_BY_PROJECT)Region-Only `{project_id}`.`region-{region}`.INFORMATION_SCHEMA.TABLE_SNAPSHOTS*<br>• Table snapshot metadata, base table references, and expiration times.
Datasets & ReplicationSCHEMATA*, SCHEMATA_OPTIONS, SCHEMATA_REPLICAS*, SCHEMATA_LINKS, SHARED_DATASET_USAGERegion-Only `{project_id}`.`region-{region}`.INFORMATION_SCHEMA.SCHEMATA*<br>• Dataset catalog, cross-region replication, and failover status.
Table ConstraintsTABLE_CONSTRAINTS, KEY_COLUMN_USAGEDual-Scoped `{project_id}`.`region-{region}`.INFORMATION_SCHEMA.{view_name}<br>OR<br> `{project_id}`.`{dataset_id}`.INFORMATION_SCHEMA.{view_name}

<!-- mdformat on -->

3. Storage Footprint, Partitions & Table Metadata Views

INFORMATION_SCHEMA.TABLE_STORAGE_USAGE_TIMELINE (and _BY_PROJECT, _BY_ORGANIZATION, _BY_FOLDER)
High-Level Description

Daily historical storage usage time integral. This view is the definitive source of truth for Cloud Billing invoice storage charges across Active vs. Long-term and Logical vs. Physical billing tiers.

Required IAM Permissions & Predefined Roles
  • Project-Level (Least Privilege): Requires bigquery.tables.get and bigquery.tables.list on the project. Granted by BigQuery Metadata Viewer (roles/bigquery.metadataViewer), BigQuery Data Viewer (roles/bigquery.dataViewer), BigQuery Data Owner (roles/bigquery.dataOwner), or BigQuery Admin (roles/bigquery.admin).

  • _BY_FOLDER: Requires bigquery.tables.get and bigquery.tables.list on the parent folder.

  • _BY_ORGANIZATION: Requires bigquery.tables.get and bigquery.tables.list on the organization.

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
billable_active_logical_usageINT64MiB-secondsActive logical usage time integral (<90 days unmutated).
billable_active_physical_usageINT64MiB-secondsActive physical usage time integral.
billable_long_term_logical_usageINT64MiB-secondsLong-term logical usage time integral (>=90 days unmutated).
billable_long_term_physical_usageINT64MiB-secondsLong-term physical usage time integral.
billable_total_logical_usageINT64MiB-secondsTotal logical usage time integral.
billable_total_physical_usageINT64MiB-secondsTotal physical compressed usage time integral.
folder_numbersARRAY<INT64>ArrayFolder hierarchy IDs containing the project (only in _BY_FOLDER).
project_idSTRINGProject IDProject containing the table.
project_numberINT64Numeric IDNumeric project ID.
table_catalogSTRINGProject IDTable catalog / project name.
table_nameSTRINGTable IDTable identifier.
table_schemaSTRINGDataset IDDataset containing the table.
usage_dateDATEPST DateDaily snapshot partition aligned strictly to US Pacific Time (PST8PDT).

<!-- mdformat on -->

[!CAUTION] Dimensional Unit Invariant: TABLE_STORAGE_USAGE_TIMELINE stores storage continuously integrated over time in MiB-seconds. To compute daily average billable GiB, always divide by 86,400 (seconds in a day) and then by 1,024: (usage / 86400) / 1024.

[!NOTE] Access Requirements: Accessing TABLE_STORAGE_USAGE_TIMELINE requires bigquery.admin or bigquery.resourceAdmin IAM permissions (or granular bigquery.tables.get and bigquery.datasets.get) to view cross-dataset storage usage. Does not require enable_info_schema_storage opt-in.

INFORMATION_SCHEMA.TABLE_STORAGE (and _BY_PROJECT, _BY_ORGANIZATION, _BY_FOLDER)
High-Level Description

Real-time point-in-time snapshot of table storage sizes, active vs. long-term uncompressed bytes, compressed physical bytes, Time Travel retention overhead, and Fail-Safe bytes. Requires storage metadata opt-in or Resource Admin IAM roles for new projects.

Required IAM Permissions & Predefined Roles
  • Project-Level (Least Privilege): Requires bigquery.tables.get and bigquery.tables.list on the project. Granted by BigQuery Metadata Viewer (roles/bigquery.metadataViewer), BigQuery Data Viewer (roles/bigquery.dataViewer), BigQuery Data Owner (roles/bigquery.dataOwner), or BigQuery Admin (roles/bigquery.admin).

  • _BY_FOLDER: Requires bigquery.tables.get and bigquery.tables.list on the parent folder.

  • _BY_ORGANIZATION: Requires bigquery.tables.get and bigquery.tables.list on the organization.

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription & Conversion Formula
active_logical_bytesINT64BytesUncompressed active logical bytes (<90 days unmutated). GiB: active_logical_bytes / POWER(1024, 3).
active_physical_bytesINT64BytesCompressed active physical bytes (includes active baseline + time travel). GiB: active_physical_bytes / POWER(1024, 3).
creation_timeTIMESTAMPUTC TimestampTable creation timestamp.
current_physical_bytesINT64BytesBaseline physical bytes before Time Travel / Fail-Safe additions.
deletedBOOLEANBooleantrue if the table has been deleted and is currently retained in Time Travel or Fail-Safe.
fail_safe_physical_bytesINT64BytesPhysical storage consumed by 7-day non-configurable Fail-Safe disaster recovery. Billed at active physical rates under Physical model; free under Logical model.
folder_numbersARRAY<INT64>ArrayFolder hierarchy IDs containing the project (only populated in _BY_FOLDER).
last_metadata_index_refresh_timeTIMESTAMPUTC TimestampLast metadata indexing refresh timestamp.
long_term_logical_bytesINT64BytesUncompressed long-term logical bytes (>=90 days unmutated). GiB: long_term_logical_bytes / POWER(1024, 3).
long_term_physical_bytesINT64BytesCompressed long-term physical bytes (>=90 days unmutated). GiB: long_term_physical_bytes / POWER(1024, 3).
managed_table_typeSTRINGEnum'NATIVE' or 'ICEBERG'.
project_idSTRINGProject IDProject containing table.
project_numberINT64Numeric IDNumeric project ID.
storage_last_modified_timeTIMESTAMPUTC TimestampLast storage mutation timestamp.
table_catalogSTRINGProject IDTable catalog / project name.
table_deletion_reasonSTRINGEnum / ReasonReason for deletion: 'TABLE EXPIRATION', 'DATASET DELETION', 'USER_DELETED'.
table_deletion_timeTIMESTAMPUTC TimestampExact timestamp when the table was deleted.
table_nameSTRINGTable IDTable name.
table_schemaSTRINGDataset IDDataset name.
time_travel_physical_bytesINT64BytesPhysical storage consumed by Time Travel retention (1 to 7 days). Billed at active physical rates under Physical model; free under Logical model.
total_logical_bytesINT64BytesSum of active_logical_bytes + long_term_logical_bytes.
total_partitionsINT64CountNumber of partitions.
total_physical_bytesINT64BytesSum of active_physical_bytes + long_term_physical_bytes.
total_rowsINT64CountCurrent row count.
table_typeSTRINGEnum'BASE TABLE', 'CLONE', 'SNAPSHOT', 'VIEW', 'MATERIALIZED VIEW'.

<!-- mdformat on -->

INFORMATION_SCHEMA.TABLES (and _BY_PROJECT)
High-Level Description

Lists all tables, views, clones, snapshots, and BigLake tables in the dataset or project, along with creation times, DDL definitions, and replication statuses.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.get and bigquery.tables.list (and bigquery.routines.get/list for routines) on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), BigQuery Data Editor (roles/bigquery.dataEditor), BigQuery Data Owner (roles/bigquery.dataOwner), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
base_table_catalogSTRINGProject IDFor table snapshots and clones, the base table project ID.
base_table_nameSTRINGTable IDFor table snapshots and clones, the base table name.
base_table_schemaSTRINGDataset IDFor table snapshots and clones, the base table dataset ID.
creation_timeTIMESTAMPUTC TimestampTimestamp when the table was created.
ddlSTRINGSQL StringComplete GoogleSQL DDL statement to reproduce the table.
default_collation_nameSTRINGStringDefault string collation specification.
is_change_history_enabledSTRING'YES' / 'NO'Indicates whether BigQuery change data capture (CDC) history is retained.
is_fine_grained_mutations_enabledSTRING'YES' / 'NO'Indicates whether fine-grained mutations are enabled on the table.
is_insertable_intoSTRING'YES' / 'NO'Indicates whether the table supports DML INSERT operations.
is_typedSTRING'NO'Always 'NO' for BigQuery tables.
managed_table_typeSTRINGEnum'NATIVE' or 'ICEBERG' (for BigLake Managed Tables).
replica_source_catalogSTRINGProject IDFor read-only table replicas, the source table project ID.
replica_source_nameSTRINGTable IDFor read-only table replicas, the source table name.
replica_source_schemaSTRINGDataset IDFor read-only table replicas, the source dataset ID.
replication_errorRECORDError StructReplication error details if table replication fails (reason, location, message).
replication_statusSTRINGEnumTable replication status ('ACTIVE', 'FAILED', 'OUT_OF_SYNC').
snapshot_time_msTIMESTAMPUTC TimestampFor snapshots/clones, the exact base table snapshot point in time.
sync_statusRECORDSync StructMetadata sync status for Apache Iceberg and BigLake tables (status, last_sync_time, message).
table_catalogSTRINGProject IDProject name.
table_nameSTRINGTable IDTable name.
table_schemaSTRINGDataset IDDataset name.
table_typeSTRINGEnum'BASE TABLE', 'VIEW', 'MATERIALIZED VIEW', 'EXTERNAL', 'SNAPSHOT', 'CLONE'.
upsert_stream_apply_watermarkTIMESTAMPUTC TimestampCDC merge watermark timestamp for BigQuery Storage Write API UPSERT streams.

<!-- mdformat on -->

INFORMATION_SCHEMA.TABLE_OPTIONS
High-Level Description

Lists all table-level configuration options specified in the DDL OPTIONS(...) clause, such as partition expiration, KMS encryption keys, and mandatory partition filter requirements.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.get and bigquery.tables.list on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypeKey ValuesDescription
option_nameSTRING'partition_expiration_days', 'require_partition_filter', 'kms_key_name', 'friendly_name', 'description'Table configuration parameter.
option_typeSTRINGSQL TypeGoogleSQL type of the option.
option_valueSTRINGStringActive option value.
table_catalogSTRINGProject IDProject name.
table_nameSTRINGTable IDTable name.
table_schemaSTRINGDataset IDDataset name.

<!-- mdformat on -->

INFORMATION_SCHEMA.TABLE_SNAPSHOTS (and _BY_PROJECT)
High-Level Description

Detailed metadata for BigQuery Table Snapshots, tracking base table lineages, snapshot creation timestamps, and snapshot retention.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.list on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
base_table_catalogSTRINGProject IDProject ID of the base table.
base_table_nameSTRINGTable IDBase table name.
base_table_schemaSTRINGDataset IDDataset ID of the base table.
snapshot_timeTIMESTAMPUTC TimestampBase table snapshot point-in-time timestamp.
table_catalogSTRINGProject IDProject containing the snapshot.
table_nameSTRINGTable IDSnapshot table name.
table_schemaSTRINGDataset IDDataset containing the snapshot.

<!-- mdformat on -->

INFORMATION_SCHEMA.PARTITIONS
High-Level Description

Provides partition-level metadata for partitioned tables, including row counts, uncompressed logical bytes, billable bytes, mutation timestamps, and storage tiers.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.getData on the table or dataset. (Note: Unlike metadata views, PARTITIONS requires table data access).

  • Predefined Roles: BigQuery Data Viewer (roles/bigquery.dataViewer), BigQuery Data Editor (roles/bigquery.dataEditor), BigQuery Data Owner (roles/bigquery.dataOwner), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
last_modified_timeTIMESTAMPUTC TimestampLast write/mutation timestamp. Partitions unmutated for >= 90 days drop to discounted Long-Term rates.
partition_idSTRINGPartition KeyPartition key string (e.g. '20260815', '__NULL__').
storage_tierSTRINGEnum'ACTIVE' (<90 days unmutated) or 'LONG_TERM' (>= 90 days unmutated).
table_catalogSTRINGProject IDProject name.
table_nameSTRINGTable IDTable identifier.
table_schemaSTRINGDataset IDDataset identifier.
total_billable_bytesINT64BytesBillable bytes for partition.
total_logical_bytesINT64BytesUncompressed logical size of partition.
total_rowsINT64CountNumber of rows in partition.

<!-- mdformat on -->

INFORMATION_SCHEMA.COLUMNS
High-Level Description

Defines schema column specifications, GoogleSQL data types, ordinal ordering, nullability constraints, partitioning columns, clustering positions, policy tags, and data masking policies.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.get and bigquery.tables.list on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
async_generation_statusRECORDStatus StructFor stored generated columns, the status of background asynchronous population (status, message, end_time).
clustering_ordinal_positionINT64Position1-indexed position in the table's clustering key specification.
collation_nameSTRINGCollationActive string collation rule.
column_defaultSTRINGSQL LiteralDefault value expression.
column_nameSTRINGField NameTop-level column name.
data_governance_tagsRECORDTags StructIAM and Data Governance tags attached to column.
data_policiesRECORDPolicy StructData policy masking definitions applied to column.
data_typeSTRINGSQL TypeGoogleSQL type ('INT64', 'ARRAY<STRING>', 'STRUCT<...>').
generation_expressionSTRINGSQL ExpressionGoogleSQL expression used to calculate generated column values.
is_generatedSTRING'ALWAYS' / 'NEVER'Indicates whether the column is a generated column.
is_hiddenSTRING'YES' / 'NO''YES' if column is hidden from SELECT * expansion.
is_identitySTRING'YES' / 'NO'Indicates whether the column is an auto-generated sequence identity.
is_nullableSTRING'YES' / 'NO'Nullability constraint.
is_partitioning_columnSTRING'YES' / 'NO''YES' if this column partitions the table.
is_storedSTRING'YES' / 'NO'Indicates whether a generated column is stored on disk or evaluated at query time.
is_system_definedSTRING'YES' / 'NO''YES' if the column is created and managed automatically by BigQuery.
is_updatableSTRING'YES' / 'NO'Always 'YES' for BigQuery tables.
ordinal_positionINT64Position1-indexed column ordinal position.
policy_tagsSTRINGResource PathCloud Data Catalog policy tag resource paths for Column-Level Security (CLS).
rounding_modeSTRINGEnumRounding mode for NUMERIC / BIGNUMERIC columns.
table_catalogSTRINGProject IDProject name.
table_nameSTRINGTable IDTable name.
table_schemaSTRINGDataset IDDataset name.

<!-- mdformat on -->

INFORMATION_SCHEMA.COLUMN_FIELD_PATHS
High-Level Description

Defines nested field path specifications for RECORD and STRUCT columns in BigQuery tables.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.get and bigquery.tables.list on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
table_catalogSTRINGProject IDProject name.
table_schemaSTRINGDataset IDDataset name.
table_nameSTRINGTable IDTable name.
column_nameSTRINGField NameTop-level column name.
field_pathSTRINGDot PathDot-delimited nested leaf path.
data_typeSTRINGSQL TypeGoogleSQL type of the nested field.
descriptionSTRINGTextField description.
collation_nameSTRINGCollationCollation rule.
rounding_modeSTRINGEnumRounding mode.
policy_tagsSTRINGResource PathPolicy tags attached to nested field.
data_governance_tagsRECORDStructData governance tags.
data_policiesRECORDStructMasking policies applied to field.

<!-- mdformat on -->

INFORMATION_SCHEMA.VIEWS
High-Level Description

Tracks definitions for logical SQL views, including underlying queries, check options, and SQL dialect flags.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.get and bigquery.tables.list on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
table_catalogSTRINGProject IDProject name.
table_schemaSTRINGDataset IDDataset name.
table_nameSTRINGTable IDView name.
view_definitionSTRINGSQL QueryQuery expression defining the logical view.
check_optionSTRINGStringView check option.
use_standard_sqlSTRING'YES' / 'NO''YES' for GoogleSQL views.

<!-- mdformat on -->

INFORMATION_SCHEMA.MATERIALIZED_VIEWS
High-Level Description

Monitors Materialized Views, automatic background refresh statuses, and refresh watermarks.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.get and bigquery.tables.list on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
table_catalogSTRINGProject IDProject name.
table_schemaSTRINGDataset IDDataset name.
table_nameSTRINGTable IDMaterialized View name.
last_refresh_timeTIMESTAMPUTC TimestampLast completed Materialized View refresh timestamp.
refresh_watermarkTIMESTAMPUTC TimestampUpstream base table data watermark incorporated into the MV cache.
last_refresh_statusRECORDStructError details if the last automatic MV refresh failed (reason, message).

<!-- mdformat on -->

<a id="sec-datasets"></a>

4. Datasets, Replication & Sharing Views

INFORMATION_SCHEMA.SCHEMATA
High-Level Description

Defines dataset-level metadata, physical location regions, creation timestamps, DDL statements, and default collation rules.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.datasets.get on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), BigQuery Data Owner (roles/bigquery.dataOwner), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypeKey ValuesDescription
catalog_nameSTRINGProject IDProject name.
schema_nameSTRINGDataset IDDataset identifier.
schema_ownerSTRINGStringOwning identity.
creation_timeTIMESTAMPUTC TimestampDataset creation timestamp.
last_modified_timeTIMESTAMPUTC TimestampLast metadata modification timestamp.
locationSTRINGRegionPhysical geographic storage region (e.g. 'US', 'EU', 'us-central1').
default_collation_nameSTRINGCollationDefault collation rule inherited by new tables.
ddlSTRINGSQL StringDDL statement to reproduce the dataset.
sync_statusJSONJSONCross-region replication sync health details.

<!-- mdformat on -->

INFORMATION_SCHEMA.SCHEMATA_OPTIONS
High-Level Description

Lists configured dataset options including storage billing models, Time Travel durations, and default partition expiration days.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.datasets.get on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), BigQuery Data Owner (roles/bigquery.dataOwner), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypeKey ValuesDescription
catalog_nameSTRINGProject IDProject name.
schema_nameSTRINGDataset IDDataset identifier.
option_nameSTRING'storage_billing_model', 'max_time_travel_hours', 'default_table_expiration_days', 'default_partition_expiration_days'Dataset configuration option.
option_typeSTRINGSQL TypeType of option.
option_valueSTRING'LOGICAL', 'PHYSICAL', '48', '14'Configured option value.

<!-- mdformat on -->

INFORMATION_SCHEMA.SCHEMATA_REPLICAS (and _BY_FAILOVER_RESERVATION)
High-Level Description

Monitors cross-region dataset replication configurations, secondary replica health, lag staleness, failover reservations, and backfill progress.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.datasets.get on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), BigQuery Data Owner (roles/bigquery.dataOwner), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
catalog_nameSTRINGProject IDProject name.
creation_completeBOOLEANBooleanTRUE if initial backfill is complete and replica is fully synchronized.
creation_timeTIMESTAMPUTC TimestampTimestamp when replica creation started.
failover_reservation_nameSTRINGReservation IDFailover reservation name (only in _BY_FAILOVER_RESERVATION).
failover_reservation_project_idSTRINGProject IDAdmin project hosting the failover compute reservation (only in _BY_FAILOVER_RESERVATION).
locationSTRINGRegionGeographic region where replica is hosted.
replica_nameSTRINGReplica IDUnique replica identifier.
replica_primary_assignedBOOLEANBooleanTRUE if this replica has the primary assignment.
replica_primary_assignment_completeBOOLEANBooleanTRUE if primary role assignment has completed.
replica_primary_assignment_completion_timeTIMESTAMPUTC TimestampTimestamp when primary switch to replica was completed.
replica_primary_assignment_timeTIMESTAMPUTC TimestampTimestamp when primary switch to replica was initiated.
replication_timeTIMESTAMPUTC TimestampReplication watermark for the most stale table within the dataset.
schema_nameSTRINGDataset IDDataset name.
sync_statusJSONJSONSync health details between primary and secondary replicas.

<!-- mdformat on -->

High-Level Description

Tracks linked datasets created via Analytics Hub data exchanges, Data Clean Rooms (DCR), and Cross-Project Shared Dataset usage.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.datasets.get on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), BigQuery Data Owner (roles/bigquery.dataOwner), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
catalog_nameSTRINGProject IDSource dataset project name.
schema_nameSTRINGDataset IDSource dataset name.
linked_schema_catalog_nameSTRINGProject IDSubscriber project hosting the linked dataset.
linked_schema_catalog_numberINT64Numeric IDSubscriber project number.
linked_schema_nameSTRINGDataset IDSubscriber linked dataset identifier.
linked_schema_org_display_nameSTRINGStringOrganization name of the subscriber.
linked_schema_creation_timeTIMESTAMPUTC TimestampCreation timestamp of linked dataset.
shared_asset_idSTRINGAsset IDAnalytics Hub listing or DCR asset identifier.
link_typeSTRINGEnum'ANALYTICS_HUB', 'DATA_CLEAN_ROOM'.

<!-- mdformat on -->

<a id="sec-routines"></a>

INFORMATION_SCHEMA.TABLE_CONSTRAINTS
High-Level Description

Defines primary key and foreign key relational constraints on base tables.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.get (for primary/foreign key definitions) and bigquery.tables.list on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
constraint_catalogSTRINGProject IDProject name.
constraint_schemaSTRINGDataset IDDataset name.
constraint_nameSTRINGConstraint IDUnique constraint identifier.
table_catalogSTRINGProject IDTable project name.
table_schemaSTRINGDataset IDTable dataset name.
table_nameSTRINGTable IDTable name.
constraint_typeSTRINGEnum'PRIMARY KEY' or 'FOREIGN KEY'.
is_deferrableSTRING'NO'Indicates deferrability.
initially_deferredSTRING'NO'Indicates initial deferral status.
enforcedSTRING'NO''NO' for informational GoogleSQL constraints.

<!-- mdformat on -->

INFORMATION_SCHEMA.KEY_COLUMN_USAGE
High-Level Description

Defines column-level participation in primary and foreign key constraints.

Required IAM Permissions & Predefined Roles
  • Requires bigquery.tables.get and bigquery.tables.list on the target dataset or project.

  • Predefined Roles: BigQuery Metadata Viewer (roles/bigquery.metadataViewer - Least Privilege), BigQuery Data Viewer (roles/bigquery.dataViewer), or BigQuery Admin (roles/bigquery.admin).

<!-- mdformat off -->

Column NameData TypePhysical UnitDescription
constraint_catalogSTRINGProject IDProject name.
constraint_schemaSTRINGDataset IDDataset name.
constraint_nameSTRINGConstraint IDConstraint identifier.
table_catalogSTRINGProject IDTable project ID.
table_schemaSTRINGDataset IDTable dataset ID.
table_nameSTRINGTable IDTable name.
column_nameSTRINGColumn NameColumn participating in constraint.
ordinal_positionINT64Position1-indexed position in composite constraint.
position_in_unique_constraintINT64PositionReferenced position in target primary key.

<!-- mdformat on -->

<a id="sec-insights"></a>

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs a command-line tool, Needs Node.js

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Google
Publisher
Google (Official)
Source
google/skills · skills/cloud/bigquery-observability · commit 2194d3b
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Google.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download bigquery-observability.zip