[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D5WHGR5MK6ZM9450S4FC9W":3,"skill-same:01M7D5WHGR5MK6ZM9450S4FC9W":101},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":28,"commitSha":29,"skillDirectory":5,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7D5WHGR5MK6ZM9450S4FC9W","bigquery-observability",null,"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).","tangyixiao\u002Ftangyixiao-skills","tangyixiao","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F115929632?v=4","01M7D582YK6A4M63CAK4CSY4EW","Tang Yixiao","01M7D582Z64DMRSYR872SR34SA",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bigquery-observability\nmetadata:\n  version: 1.2.1\n  category: BigDataAndAnalytics\ndescription: Provides data-retrieval best practices, tool selection guidance, and\n  performant SQL query syntax for BigQuery telemetry across INFORMATION_SCHEMA, Cloud\n  Monitoring, and the REST API. Use when the telemetry to fetch is already known,\n  selecting telemetry tools, writing performant INFORMATION_SCHEMA queries, retrieving\n  telemetry for diagnosing single-job performance bottlenecks, investigating slot\n  contention, job concurrency and queue latency, analyzing reservation capacity, utilization\n  and autoscaling saturation, or auditing capacity-based and on-demand compute and\n  storage resource billable usage. Don't use for root-cause diagnosis or symptom troubleshooting\n  when the cause is unknown (use bigquery-troubleshooting first), or for writing or\n  optimizing business logic SQL (use bigquery-optimization).\n---\n\n# BigQuery Observability\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:bigquery-observability)\"`\nand append `agent-skills\u002F1.0 (skill:bigquery-observability)` to `User-Agent` headers.\n\n## Tool Selection\n\n\u003C!-- mdformat off -->\n\n| Tool | Primary Use Cases | Strengths & Capabilities | When to Avoid \u002F Limitations |\n| --- | --- | --- | --- |\n| **`INFORMATION_SCHEMA` (`I_S`)** | Historical analysis, cohort comparison (`normalized_literals`), discovery of fast\u002Fslow windows, reservation\u002Fproject timelines, multi-job aggregates, cost\u002Fbilling 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). |\n| **REST API (`jobs.api` \u002F `reservation.api`)** | Single-job point-lookup, real-time stage bottleneck diagnosis, automated pipeline status checks, reservation\u002Fcapacity commitment configuration inspection (`reservations.get`, `reservations.list`). | Zero-SQL overhead, fast REST\u002FCLI 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. |\n| **`Cloud Monitoring` (Metrics Explorer \u002F Charts)** | Real-time alerting, fleet-wide dashboards, continuous slot utilization tracking, high-level SLA\u002FSLO 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. |\n\n\u003C!-- mdformat on -->\n\n## Prerequisites & Environment Setup\n\nBefore retrieving telemetry or running observability queries, ensure the\nGoogle Cloud environment and project are configured:\n\n1.  **Google Cloud SDK**: Ensure the\n    [Google Cloud SDK](https:\u002F\u002Fcloud.google.com\u002Fsdk\u002Fdocs\u002Finstall) is installed\n    and configured.\n2.  **Project Selection**: Set the active Google Cloud project:\n\n    ```bash\n    gcloud config set project {project_id}\n    ```\n\n3.  **API Enablement**: Ensure the BigQuery and Cloud Monitoring APIs are\n    enabled:\n\n    ```bash\n    gcloud services enable bigquery.googleapis.com monitoring.googleapis.com\n    ```\n\n4.  **Authentication**: Authenticate the environment:\n    *   CLI queries and `bq` commands: `gcloud auth login`\n    *   SDKs and automated client tools:\n        `gcloud auth application-default login`\n    *   Service accounts: Set\n        `GOOGLE_APPLICATION_CREDENTIALS=\"\u002Fpath\u002Fto\u002Fkey.json\"`\n\n5.  **Billing & IAM Roles**:\n    *   Verify an active Google Cloud Billing account is attached to\n        `{project_id}`.\n    *   Ensure appropriate IAM roles:\n        *   `roles\u002Fbigquery.jobUser`: Running telemetry queries.\n        *   `roles\u002Fbigquery.resourceViewer` or `roles\u002Fbigquery.admin`:\n            Organization-level jobs and reservation telemetry.\n        *   `roles\u002Fmonitoring.viewer`: Cloud Monitoring metrics.\n\n6.  **Companion Skills Installation**:\n    This skill is part of a 3-pillar operations suite (`bigquery-observability`,\n    `bigquery-optimization`, `bigquery-troubleshooting`). If any companion skill\n    is not yet installed in your environment, install the full suite:\n\n    ```bash\n    npx skills add google\u002Fskills --skill bigquery-observability --skill bigquery-optimization --skill bigquery-troubleshooting\n    ```\n\n## Workflow\n\n1.  **Single-Job Point-Lookup (Zero-SQL Overhead):** For single-job slowness or\n    inspection, always prioritize the REST API or CLI (`bq show -j`) first. It\n    provides zero-SQL overhead and fast point-lookups for internal stage\n    bottlenecks (`performanceInsights`, `queryPlan`, shuffle spill).\n\n    ```bash\n    bq show --location={location} -j {project_id}:{job_id}\n    ```\n\n2.  **Diagnostic Transition Logic:** If no job-level issues are found (e.g. no\n    clear internal bottlenecks), the investigation should transition to\n    system-level `INFORMATION_SCHEMA` queries (such as `JOBS_TIMELINE` or\n    `RESERVATIONS_TIMELINE`) to check for broader issues like slot contention,\n    queueing delay, or noisy neighbors.\n\n## Best Practices for Writing `INFORMATION_SCHEMA` Queries\n\nEvery query against a BigQuery `INFORMATION_SCHEMA` view must be qualified with\neither a **region qualifier** or a **dataset qualifier**, optionally prefixed by\na **project qualifier**.\n\n### Qualification Syntax & Scope Matching\n\n1.  **Region-Qualified Syntax:**\n\n    ```googlesql\n    `{project_id}`.`region-{region}`.INFORMATION_SCHEMA.{view}\n    ```\n\n    *Example:* `` `my-project`.`region-us`.INFORMATION_SCHEMA.JOBS``\n\n    *Applies to:* Regional telemetry views (`JOBS*`, `JOBS_TIMELINE*`,\n    `RESERVATIONS*`, `CAPACITY_COMMITMENTS*`, `TABLE_STORAGE*`,\n    `STREAMING_TIMELINE*`). The client query execution location MUST match the\n    `region-{region}` qualifier (or BigQuery throws: `Not found: Table\n    {project_id}:region-{region}.INFORMATION_SCHEMA.{view} was not found in\n    location {location}`).\n\n2.  **Dataset-Qualified Syntax:**\n\n    ```googlesql\n    `{project_id}`.`{dataset_id}`.INFORMATION_SCHEMA.{view}\n    ```\n\n    *Example:* `` `my-project`.`analytics`.INFORMATION_SCHEMA.TABLES``\n\n    *Applies to:* Dataset-scoped views (`PARTITIONS`, `SEARCH_INDEXES*`,\n    `ROW_ACCESS_POLICIES`). Never use `region-` with dataset views.\n\n3.  **Dual-Scoped Views:** Views like `TABLES`, `COLUMNS`, `COLUMN_FIELD_PATHS`,\n    `VIEWS`, `ROUTINES`, and `VECTOR_INDEXES` can be qualified with either\n    `{dataset_id}` or `region-{region}` depending on whether dataset or\n    region-wide analysis is required.\n\n4.  **Project Qualifier (`{project_id}`):** Optional. If omitted, queries\n    default to the project in which the query is executing. Specifying a project\n    qualifier on organization-level views (e.g. `JOBS_BY_ORGANIZATION`) has no\n    impact on results.\n\n### Principle of Least Privilege & Scope Selection\n\nWhen constructing `INFORMATION_SCHEMA` queries, **always select the scope and\nview variant with the least IAM permission requirement** that satisfies the\nanalytical need:\n\n1.  **User-Level over Project-Level (`_BY_USER`):** When diagnosing queries or\n    sessions executed by the current user, use `_BY_USER` (e.g. `JOBS_BY_USER`,\n    `SESSIONS_BY_USER`). This requires only `bigquery.jobs.list` (granted via\n    `roles\u002Fbigquery.user` or `roles\u002Fbigquery.jobUser`), avoiding the need for\n    `bigquery.jobs.listAll` or `roles\u002Fbigquery.admin`.\n2.  **Dataset-Level over Region\u002FProject-Level:** When querying table metadata,\n    columns, or views for a specific dataset, qualify with `{dataset_id}` rather\n    than `region-{region}` when project-level metadata access is restricted.\n    Dataset-scoped queries require permissions only on that target dataset.\n3.  **Project-Level over Org\u002FFolder-Level (`_BY_PROJECT`):** Always start with\n    project-scoped views before escalating to `_BY_FOLDER` or\n    `_BY_ORGANIZATION`. Folder and organization queries require broad folder\u002Forg\n    IAM permissions (`bigquery.jobs.listAll` or `bigquery.tables.list` at the\n    Org\u002FFolder node).\n4.  **Metadata Roles over Data Roles:** For table and storage introspection,\n    prefer `roles\u002Fbigquery.metadataViewer` (which provides `bigquery.tables.get`\n    and `bigquery.tables.list`) over `roles\u002Fbigquery.dataViewer` or\n    `roles\u002Fbigquery.dataOwner` when data read access (`bigquery.tables.getData`)\n    is not needed. (Note: `INFORMATION_SCHEMA.PARTITIONS` uniquely requires\n    `bigquery.tables.getData`).\n\n### Execution Guardrails & Query Invariants\n\n*   **Mandatory Partition & Time Filtering:** Always filter on `creation_time`\n    (e.g., `creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 3\n    DAY)`) or `usage_date` to avoid full metadata table scans.\n*   **Script Wrapper Exclusion:** Add `AND (statement_type != 'SCRIPT' OR\n    statement_type IS NULL)` when aggregating compute spend to avoid\n    double-counting parent scripts and child jobs.\n*   **Column Pruning:** Never use `SELECT *` against `INFORMATION_SCHEMA`; only\n    project required columns.\n*   **Dry Run & Cost Estimation:** Use a dry run (`bq query --dry_run\n    --use_legacy_sql=false \"{query}\"` or API `dryRun=true`) before executing\n    complex queries, multi-view joins, or large scans to validate syntax and\n    estimate `totalBytesProcessed` at zero cost.\n*   **Empty Regional Scope (0 Rows):** If the execution location matches the\n    qualifier, but the project has no datasets or jobs in that region, the query\n    succeeds and returns **0 rows**. Never assume 0 rows means 0 usage—always\n    verify the target dataset locations.\n*   **Non-Hierarchical Region Scope:** Region qualifiers are not hierarchical.\n    Multi-regions do not encompass single regions (e.g. `region-us` returns only\n    multi-region `US` metadata and does not include single regions like\n    `region-us-central1`).\n*   **No Multi-Region Aggregation in SQL:** Region qualifiers cannot be joined\n    cross-region in a single query (e.g. `region-us` cannot join `region-eu`).\n*   **Uncached Execution & Minimum Scan Size:** `INFORMATION_SCHEMA` query\n    results are never cached. On-demand queries incur a minimum of 10 MB of data\n    processing charges per execution.\n\n## Domain References & SQL Queries\n\n### Telemetry Query Guides\n\n*   **On-Demand Compute: Billed Bytes**\n    (`references\u002Fcompute_ondemand_billable.md`): Authoritative Golden CTE\n    (`bytes_billed_cte`), timezone-aligned billing date extraction (PST8PDT),\n    BQML CREATE_MODEL 50x multiplier rules, script wrapper deduplication, and\n    row-level security (RLS) masking checks.\n*   **Capacity Compute: Billable Slots & Commitments**\n    (`references\u002Fcompute_capacity_billable.md`): Query templates for auditing\n    billable capacity hours across 1-Year\u002F3-Year commitments, uncovered baseline\n    PAYG slots, and dynamic autoscaling hours.\n*   **Storage Footprints & Usage (Bytes Stored)**\n    (`references\u002Fstorage_footprints.md`): Storage snapshot queries, compression\n    ratio calculations, Time Travel \u002F Fail-Safe churn, daily average GiB\n    time-integrals, billing model evaluation, and search index coverage.\n\n### Performance & Troubleshooting Guides\n\n*   **Job Performance Queries** (`references\u002Fjob_performance_queries.md`):\n    Queries for evaluating individual and aggregate job performance, stage\n    bottleneck flags, comparable jobs via normalized literals\n    (`query_info.query_hashes.normalized_literals`), BI Engine acceleration,\n    metadata cache (cmeta) acceleration, search index usage, materialized view\n    rewrite usage, and execution variance outliers.\n*   **Resource Contention Queries**\n    (`references\u002Fresource_contention_queries.md`): Queries for diagnosing slot\n    contention, queue latency, per-minute concurrency\u002Fqueue timelines, and\n    1-second reservation slot saturation.\n*   **Capacity & Configuration Queries**\n    (`references\u002Fcapacity_and_configuration_queries.md`): Queries for evaluating\n    second-by-second baseline\u002Fmax capacity ceilings, autoscaling saturation\n    timelines, and auditing configuration changes\n    (`RESERVATION_CHANGES_BY_PROJECT`, `ASSIGNMENT_CHANGES_BY_PROJECT`).\n\n### Schema Dictionaries (Column Definitions & Units)\n\n*   **Compute & Capacity Schema Dictionary** (`references\u002Fschema_compute.md`):\n    Complete column dictionary, physical units, and least-privilege IAM roles\n    for all compute, job, session, reservation, capacity commitment, and\n    assignment views (`JOBS*`, `JOBS_TIMELINE*`, `SESSIONS_BY_USER`,\n    `SESSIONS_BY_PROJECT`, `RESERVATIONS*`, `RESERVATION_CHANGES*`,\n    `RESERVATIONS_TIMELINE*`, `CAPACITY_COMMITMENTS*`,\n    `CAPACITY_COMMITMENT_CHANGES_BY_PROJECT`, `ASSIGNMENTS*`,\n    `ASSIGNMENT_CHANGES_BY_PROJECT`).\n*   **Storage & Data Catalog Schema Dictionary**\n    (`references\u002Fschema_storage.md`): Complete column dictionary, physical\n    units, and least-privilege IAM roles for all table storage, partition,\n    column, snapshot, dataset, constraint, and replication views\n    (`TABLE_STORAGE*`, `TABLE_STORAGE_USAGE_TIMELINE*`, `TABLES*`,\n    `TABLE_OPTIONS`, `COLUMNS`, `COLUMN_FIELD_PATHS`, `PARTITIONS`, `VIEWS`,\n    `MATERIALIZED_VIEWS`, `TABLE_SNAPSHOTS*`, `TABLE_CONSTRAINTS`,\n    `KEY_COLUMN_USAGE`, `SCHEMATA*`, `SCHEMATA_OPTIONS`, `SCHEMATA_REPLICAS*`,\n    `SCHEMATA_LINKS`, `SHARED_DATASET_USAGE`).\n*   **Platform, Governance & Ingestion Schema Dictionary**\n    (`references\u002Fschema_others.md`): Complete column dictionary, physical units,\n    and least-privilege IAM roles for all remaining views including Access\n    Control (`OBJECT_PRIVILEGES`, `ROW_ACCESS_POLICIES`,\n    `ROW_ACCESS_POLICY_OPTIONS`), Streaming Ingestion\n    (`STREAMING_TIMELINE_BY_PROJECT*`, `WRITE_API_TIMELINE_BY_PROJECT*`),\n    Configuration Options (`PROJECT_OPTIONS*`, `EFFECTIVE_PROJECT_OPTIONS`,\n    `ORGANIZATION_OPTIONS*`, `ORGANIZATION_OPTIONS_CHANGES`), Insights &\n    Recommendations (`RECOMMENDATIONS*`, `INSIGHTS`), and Indexes\u002FBI\n    Engine\u002FRoutines (`SEARCH_INDEXES*`, `SEARCH_INDEX_COLUMNS`,\n    `SEARCH_INDEX_OPTIONS`, `VECTOR_INDEXES*`, `VECTOR_INDEX_COLUMNS`,\n    `VECTOR_INDEX_OPTIONS`, `BI_CAPACITIES`, `BI_CAPACITY_CHANGES`, `ROUTINES*`,\n    `ROUTINE_OPTIONS`, `PARAMETERS`).\n","# BigQuery Observability\n\n## Attribution\n\n**MUST READ**: Before executing any `gcloud`, REST API, or MCP command, you\nMUST read [Usage Attribution](references\u002Fattribution.md). For commands executed\ndirectly in the terminal (never in generated scripts, Terraform, or user code),\nprefix `gcloud` with\n`CLOUDSDK_METRICS_REQUEST_ATTRIBUTION=\"agent-skills\u002F1.0 (skill:bigquery-observability)\"`\nand append `agent-skills\u002F1.0 (skill:bigquery-observability)` to `User-Agent` headers.\n\n## Tool Selection\n\n\u003C!-- mdformat off -->\n\n| Tool | Primary Use Cases | Strengths & Capabilities | When to Avoid \u002F Limitations |\n| --- | --- | --- | --- |\n| **`INFORMATION_SCHEMA` (`I_S`)** | Historical analysis, cohort comparison (`normalized_literals`), discovery of fast\u002Fslow windows, reservation\u002Fproject timelines, multi-job aggregates, cost\u002Fbilling 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). |\n| **REST API (`jobs.api` \u002F `reservation.api`)** | Single-job point-lookup, real-time stage bottleneck diagnosis, automated pipeline status checks, reservation\u002Fcapacity commitment configuration inspection (`reservations.get`, `reservations.list`). | Zero-SQL overhead, fast REST\u002FCLI 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. |\n| **`Cloud Monitoring` (Metrics Explorer \u002F Charts)** | Real-time alerting, fleet-wide dashboards, continuous slot utilization tracking, high-level SLA\u002FSLO 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. |\n\n\u003C!-- mdformat on -->\n\n## Prerequisites & Environment Setup\n\nBefore retrieving telemetry or running observability queries, ensure the\nGoogle Cloud environment and project are configured:\n\n1.  **Google Cloud SDK**: Ensure the\n    [Google Cloud SDK](https:\u002F\u002Fcloud.google.com\u002Fsdk\u002Fdocs\u002Finstall) is installed\n    and configured.\n2.  **Project Selection**: Set the active Google Cloud project:\n\n    ```bash\n    gcloud config set project {project_id}\n    ```\n\n3.  **API Enablement**: Ensure the BigQuery and Cloud Monitoring APIs are\n    enabled:\n\n    ```bash\n    gcloud services enable bigquery.googleapis.com monitoring.googleapis.com\n    ```\n\n4.  **Authentication**: Authenticate the environment:\n    *   CLI queries and `bq` commands: `gcloud auth login`\n    *   SDKs and automated client tools:\n        `gcloud auth application-default login`\n    *   Service accounts: Set\n        `GOOGLE_APPLICATION_CREDENTIALS=\"\u002Fpath\u002Fto\u002Fkey.json\"`\n\n5.  **Billing & IAM Roles**:\n    *   Verify an active Google Cloud Billing account is attached to\n        `{project_id}`.\n    *   Ensure appropriate IAM roles:\n        *   `roles\u002Fbigquery.jobUser`: Running telemetry queries.\n        *   `roles\u002Fbigquery.resourceViewer` or `roles\u002Fbigquery.admin`:\n            Organization-level jobs and reservation telemetry.\n        *   `roles\u002Fmonitoring.viewer`: Cloud Monitoring metrics.\n\n6.  **Companion Skills Installation**:\n    This skill is part of a 3-pillar operations suite (`bigquery-observability`,\n    `bigquery-optimization`, `bigquery-troubleshooting`). If any companion skill\n    is not yet installed in your environment, install the full suite:\n\n    ```bash\n    npx skills add google\u002Fskills --skill bigquery-observability --skill bigquery-optimization --skill bigquery-troubleshooting\n    ```\n\n## Workflow\n\n1.  **Single-Job Point-Lookup (Zero-SQL Overhead):** For single-job slowness or\n    inspection, always prioritize the REST API or CLI (`bq show -j`) first. It\n    provides zero-SQL overhead and fast point-lookups for internal stage\n    bottlenecks (`performanceInsights`, `queryPlan`, shuffle spill).\n\n    ```bash\n    bq show --location={location} -j {project_id}:{job_id}\n    ```\n\n2.  **Diagnostic Transition Logic:** If no job-level issues are found (e.g. no\n    clear internal bottlenecks), the investigation should transition to\n    system-level `INFORMATION_SCHEMA` queries (such as `JOBS_TIMELINE` or\n    `RESERVATIONS_TIMELINE`) to check for broader issues like slot contention,\n    queueing delay, or noisy neighbors.\n\n## Best Practices for Writing `INFORMATION_SCHEMA` Queries\n\nEvery query against a BigQuery `INFORMATION_SCHEMA` view must be qualified with\neither a **region qualifier** or a **dataset qualifier**, optionally prefixed by\na **project qualifier**.\n\n### Qualification Syntax & Scope Matching\n\n1.  **Region-Qualified Syntax:**\n\n    ```googlesql\n    `{project_id}`.`region-{region}`.INFORMATION_SCHEMA.{view}\n    ```\n\n    *Example:* `` `my-project`.`region-us`.INFORMATION_SCHEMA.JOBS``\n\n    *Applies to:* Regional telemetry views (`JOBS*`, `JOBS_TIMELINE*`,\n    `RESERVATIONS*`, `CAPACITY_COMMITMENTS*`, `TABLE_STORAGE*`,\n    `STREAMING_TIMELINE*`). The client query execution location MUST match the\n    `region-{region}` qualifier (or BigQuery throws: `Not found: Table\n    {project_id}:region-{region}.INFORMATION_SCHEMA.{view} was not found in\n    location {location}`).\n\n2.  **Dataset-Qualified Syntax:**\n\n    ```googlesql\n    `{project_id}`.`{dataset_id}`.INFORMATION_SCHEMA.{view}\n    ```\n\n    *Example:* `` `my-project`.`analytics`.INFORMATION_SCHEMA.TABLES``\n\n    *Applies to:* Dataset-scoped views (`PARTITIONS`, `SEARCH_INDEXES*`,\n    `ROW_ACCESS_POLICIES`). Never use `region-` with dataset views.\n\n3.  **Dual-Scoped Views:** Views like `TABLES`, `COLUMNS`, `COLUMN_FIELD_PATHS`,\n    `VIEWS`, `ROUTINES`, and `VECTOR_INDEXES` can be qualified with either\n    `{dataset_id}` or `region-{region}` depending on whether dataset or\n    region-wide analysis is required.\n\n4.  **Project Qualifier (`{project_id}`):** Optional. If omitted, queries\n    default to the project in which the query is executing. Specifying a project\n    qualifier on organization-level views (e.g. `JOBS_BY_ORGANIZATION`) has no\n    impact on results.\n\n### Principle of Least Privilege & Scope Selection\n\nWhen constructing `INFORMATION_SCHEMA` queries, **always select the scope and\nview variant with the least IAM permission requirement** that satisfies the\nanalytical need:\n\n1.  **User-Level over Project-Level (`_BY_USER`):** When diagnosing queries or\n    sessions executed by the current user, use `_BY_USER` (e.g. `JOBS_BY_USER`,\n    `SESSIONS_BY_USER`). This requires only `bigquery.jobs.list` (granted via\n    `roles\u002Fbigquery.user` or `roles\u002Fbigquery.jobUser`), avoiding the need for\n    `bigquery.jobs.listAll` or `roles\u002Fbigquery.admin`.\n2.  **Dataset-Level over Region\u002FProject-Level:** When querying table metadata,\n    columns, or views for a specific dataset, qualify with `{dataset_id}` rather\n    than `region-{region}` when project-level metadata access is restricted.\n    Dataset-scoped queries require permissions only on that target dataset.\n3.  **Project-Level over Org\u002FFolder-Level (`_BY_PROJECT`):** Always start with\n    project-scoped views before escalating to `_BY_FOLDER` or\n    `_BY_ORGANIZATION`. Folder and organization queries require broad folder\u002Forg\n    IAM permissions (`bigquery.jobs.listAll` or `bigquery.tables.list` at the\n    Org\u002FFolder node).\n4.  **Metadata Roles over Data Roles:** For table and storage introspection,\n    prefer `roles\u002Fbigquery.metadataViewer` (which provides `bigquery.tables.get`\n    and `bigquery.tables.list`) over `roles\u002Fbigquery.dataViewer` or\n    `roles\u002Fbigquery.dataOwner` when data read access (`bigquery.tables.getData`)\n    is not needed. (Note: `INFORMATION_SCHEMA.PARTITIONS` uniquely requires\n    `bigquery.tables.getData`).\n\n### Execution Guardrails & Query Invariants\n\n*   **Mandatory Partition & Time Filtering:** Always filter on `creation_time`\n    (e.g., `creation_time >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 3\n    DAY)`) or `usage_date` to avoid full metadata table scans.\n*   **Script Wrapper Exclusion:** Add `AND (statement_type != 'SCRIPT' OR\n    statement_type IS NULL)` when aggregating compute spend to avoid\n    double-counting parent scripts and child jobs.\n*   **Column Pruning:** Never use `SELECT *` against `INFORMATION_SCHEMA`; only\n    project required columns.\n*   **Dry Run & Cost Estimation:** Use a dry run (`bq query --dry_run\n    --use_legacy_sql=false \"{query}\"` or API `dryRun=true`) before executing\n    complex queries, multi-view joins, or large scans to validate syntax and\n    estimate `totalBytesProcessed` at zero cost.\n*   **Empty Regional Scope (0 Rows):** If the execution location matches the\n    qualifier, but the project has no datasets or jobs in that region, the query\n    succeeds and returns **0 rows**. Never assume 0 rows means 0 usage—always\n    verify the target dataset locations.\n*   **Non-Hierarchical Region Scope:** Region qualifiers are not hierarchical.\n    Multi-regions do not encompass single regions (e.g. `region-us` returns only\n    multi-region `US` metadata and does not include single regions like\n    `region-us-central1`).\n*   **No Multi-Region Aggregation in SQL:** Region qualifiers cannot be joined\n    cross-region in a single query (e.g. `region-us` cannot join `region-eu`).\n*   **Uncached Execution & Minimum Scan Size:** `INFORMATION_SCHEMA` query\n    results are never cached. On-demand queries incur a minimum of 10 MB of data\n    processing charges per execution.\n\n## Domain References & SQL Queries\n\n### Telemetry Query Guides\n\n*   **On-Demand Compute: Billed Bytes**\n    (`references\u002Fcompute_ondemand_billable.md`): Authoritative Golden CTE\n    (`bytes_billed_cte`), timezone-aligned billing date extraction (PST8PDT),\n    BQML CREATE_MODEL 50x multiplier rules, script wrapper deduplication, and\n    row-level security (RLS) masking checks.\n*   **Capacity Compute: Billable Slots & Commitments**\n    (`references\u002Fcompute_capacity_billable.md`): Query templates for auditing\n    billable capacity hours across 1-Year\u002F3-Year commitments, uncovered baseline\n    PAYG slots, and dynamic autoscaling hours.\n*   **Storage Footprints & Usage (Bytes Stored)**\n    (`references\u002Fstorage_footprints.md`): Storage snapshot queries, compression\n    ratio calculations, Time Travel \u002F Fail-Safe churn, daily average GiB\n    time-integrals, billing model evaluation, and search index coverage.\n\n### Performance & Troubleshooting Guides\n\n*   **Job Performance Queries** (`references\u002Fjob_performance_queries.md`):\n    Queries for evaluating individual and aggregate job performance, stage\n    bottleneck flags, comparable jobs via normalized literals\n    (`query_info.query_hashes.normalized_literals`), BI Engine acceleration,\n    metadata cache (cmeta) acceleration, search index usage, materialized view\n    rewrite usage, and execution variance outliers.\n*   **Resource Contention Queries**\n    (`references\u002Fresource_contention_queries.md`): Queries for diagnosing slot\n    contention, queue latency, per-minute concurrency\u002Fqueue timelines, and\n    1-second reservation slot saturation.\n*   **Capacity & Configuration Queries**\n    (`references\u002Fcapacity_and_configuration_queries.md`): Queries for evaluating\n    second-by-second baseline\u002Fmax capacity ceilings, autoscaling saturation\n    timelines, and auditing configuration changes\n    (`RESERVATION_CHANGES_BY_PROJECT`, `ASSIGNMENT_CHANGES_BY_PROJECT`).\n\n### Schema Dictionaries (Column Definitions & Units)\n\n*   **Compute & Capacity Schema Dictionary** (`references\u002Fschema_compute.md`):\n    Complete column dictionary, physical units, and least-privilege IAM roles\n    for all compute, job, session, reservation, capacity commitment, and\n    assignment views (`JOBS*`, `JOBS_TIMELINE*`, `SESSIONS_BY_USER`,\n    `SESSIONS_BY_PROJECT`, `RESERVATIONS*`, `RESERVATION_CHANGES*`,\n    `RESERVATIONS_TIMELINE*`, `CAPACITY_COMMITMENTS*`,\n    `CAPACITY_COMMITMENT_CHANGES_BY_PROJECT`, `ASSIGNMENTS*`,\n    `ASSIGNMENT_CHANGES_BY_PROJECT`).\n*   **Storage & Data Catalog Schema Dictionary**\n    (`references\u002Fschema_storage.md`): Complete column dictionary, physical\n    units, and least-privilege IAM roles for all table storage, partition,\n    column, snapshot, dataset, constraint, and replication views\n    (`TABLE_STORAGE*`, `TABLE_STORAGE_USAGE_TIMELINE*`, `TABLES*`,\n    `TABLE_OPTIONS`, `COLUMNS`, `COLUMN_FIELD_PATHS`, `PARTITIONS`, `VIEWS`,\n    `MATERIALIZED_VIEWS`, `TABLE_SNAPSHOTS*`, `TABLE_CONSTRAINTS`,\n    `KEY_COLUMN_USAGE`, `SCHEMATA*`, `SCHEMATA_OPTIONS`, `SCHEMATA_REPLICAS*`,\n    `SCHEMATA_LINKS`, `SHARED_DATASET_USAGE`).\n*   **Platform, Governance & Ingestion Schema Dictionary**\n    (`references\u002Fschema_others.md`): Complete column dictionary, physical units,\n    and least-privilege IAM roles for all remaining views including Access\n    Control (`OBJECT_PRIVILEGES`, `ROW_ACCESS_POLICIES`,\n    `ROW_ACCESS_POLICY_OPTIONS`), Streaming Ingestion\n    (`STREAMING_TIMELINE_BY_PROJECT*`, `WRITE_API_TIMELINE_BY_PROJECT*`),\n    Configuration Options (`PROJECT_OPTIONS*`, `EFFECTIVE_PROJECT_OPTIONS`,\n    `ORGANIZATION_OPTIONS*`, `ORGANIZATION_OPTIONS_CHANGES`), Insights &\n    Recommendations (`RECOMMENDATIONS*`, `INSIGHTS`), and Indexes\u002FBI\n    Engine\u002FRoutines (`SEARCH_INDEXES*`, `SEARCH_INDEX_COLUMNS`,\n    `SEARCH_INDEX_OPTIONS`, `VECTOR_INDEXES*`, `VECTOR_INDEX_COLUMNS`,\n    `VECTOR_INDEX_OPTIONS`, `BI_CAPACITIES`, `BI_CAPACITY_CHANGES`, `ROUTINES*`,\n    `ROUTINE_OPTIONS`, `PARAMETERS`).\n",{"name":5,"metadata":25,"description":7},{"version":26,"category":27},"1.2.1","BigDataAndAnalytics","main","2a870f189175a48c39f5f7e26a6d93b0be9cd13b",0,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills","https:\u002F\u002Ftangyixiao.github.io\u002Ftangyixiao-skills\u002F","https:\u002F\u002Fgithub.com\u002Ftangyixiao","http:\u002F\u002Fwww.sxyz.net\u002F","I am Tang Yixiao, a student in Shaoxing No.1 High School. I am eager to learn on GitHub and contribute my part to this community.","2026-11-11 15:45:59",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add tangyixiao\u002Ftangyixiao-skills --skill bigquery-observability",{"tool":43,"command":44},"bunx","bunx skills add tangyixiao\u002Ftangyixiao-skills --skill bigquery-observability",{"tool":46,"command":47},"pnpm","pnpm dlx skills add tangyixiao\u002Ftangyixiao-skills --skill bigquery-observability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002FSKILL.md",true,[51,57,61,65,69,73,77,81,85,89,93,97],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"INSTALL-SOURCE.json","REFERENCE","参考文档",526,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002FINSTALL-SOURCE.json",{"path":58,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":16},"LICENSE","许可证",11358,{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002Fattribution.md",1906,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fattribution.md",{"path":66,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":67,"sourceHtmlUrl":68},"references\u002Fcapacity_and_configuration_queries.md",6788,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fcapacity_and_configuration_queries.md",{"path":70,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fcompute_capacity_billable.md",6313,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fcompute_capacity_billable.md",{"path":74,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fcompute_ondemand_billable.md",5841,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fcompute_ondemand_billable.md",{"path":78,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fjob_performance_queries.md",11364,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fjob_performance_queries.md",{"path":82,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fresource_contention_queries.md",9569,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fresource_contention_queries.md",{"path":86,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fschema_compute.md",41402,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fschema_compute.md",{"path":90,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fschema_others.md",32810,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fschema_others.md",{"path":94,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fschema_storage.md",35142,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fschema_storage.md",{"path":98,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fstorage_footprints.md",10313,"https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fbigquery-observability\u002Freferences\u002Fstorage_footprints.md",[102,110,119,127,135,143],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":20},"01M7D8JK8FYBFNNAJXWD89CFH7","xlsx","Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fxlsx\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":115,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":20},"01M7D8JG8ERGGQQAMX0DWCG9GR","writing-shape","Writing, exploit: shape raw material into an article, paragraph by paragraph.","MIT","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-shape\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":123,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":20},"01M7D8JE672GW3EHSE8EF185M4","writing-fragments","Writing, explore: mine raw fragments, no structure yet.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-fragments\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":131,"sourceHtmlUrl":132,"categories":133,"keywords":134,"publishedAt":20},"01M7D8JBK572YDFMND8Q6CEYJW","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":139,"sourceHtmlUrl":140,"categories":141,"keywords":142,"publishedAt":20},"01M7D8J5QPWEXX61EGBKYH73R8","writing-clearly-and-concisely","Use when writing prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Applies Strunk's timeless rules for clearer, stronger, more professional writing.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-clearly-and-concisely\u002FSKILL.md",[],[],{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":147,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":20},"01M7D8J36YWC8WZS5DK5AH03CD","writing-beats","Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ftangyixiao\u002Ftangyixiao-skills\u002Fblob\u002Fmain\u002Fwriting-beats\u002FSKILL.md",[],[]]