Agent Skillsgoogle/skills › bigtable-basics

bigtable-basics

GitHub

提供Google Bigtable核心管理、Schema设计及查询指南。涵盖gcloud/cbt CLI使用、行键设计优化、性能诊断(Key Visualizer)及数据操作,适用于实例配置、表结构管理和SQL/客户端代码编写。

skills/cloud/bigtable-basics/SKILL.md google/skills

Trigger Scenarios

Bigtable实例或集群配置 Bigtable表结构设计 Bigtable查询语句编写 Bigtable性能问题排查

Install

npx skills add google/skills --skill bigtable-basics -g -y
More Options

Non-standard path

npx skills add https://github.com/google/skills/tree/main/skills/cloud/bigtable-basics -g -y

Use without installing

npx skills use google/skills@bigtable-basics

指定 Agent (Claude Code)

npx skills add google/skills --skill bigtable-basics -a claude-code -g -y

安装 repo 全部 skill

npx skills add google/skills --all -g -y

预览 repo 内 skill

npx skills add google/skills --list

SKILL.md

Frontmatter
{
    "name": "bigtable-basics",
    "metadata": {
        "category": "Databases"
    },
    "description": "Assists in provisioning instances\/tables, designing performant schemas, and querying data in Bigtable. Use when designing Bigtable row keys, configuring column families, writing SQL queries or client library code (Java, Go, Python) for Bigtable, or diagnosing performance\/hotspotting issues. Also use when provisioning Bigtable clusters using gcloud or cbt CLIs. Don't use for generic Cloud SQL administration."
}

Bigtable Basics

This skill provides core workflows and guidance for administering and developing with Google Bigtable.

Core Principles

  • Control Plane vs. Data Plane:
    • Use gcloud for Control Plane operations: Manage Instances, Clusters, App Profiles, Backups and IAM. Create Tables, Logical Views, Materialized Views and Authorized Views.
    • Use cbt for Data Plane operations: Update Tables, Column Families, and reading/writing data.
  • Performance First: Bigtable is a NoSQL database. Efficiency is tied to Row Key design. Always warn about Full Table Scans.
  • Client Selection: For production use cases, prefer Java or Go for their superior performance and feature coverage compared to other languages.
  • Observability: When diagnosing performance or hotspotting, always mention Key Visualizer (via Cloud Console) as the primary diagnostic tool because it provides the most granular view of access patterns across row keys. This should be followed by the hot-tablets tool and table stats in gcloud CLI and include-stats=full option under cbt read to diagnose slow queries.

[!IMPORTANT] Safety Rule: You MUST obtain explicit user confirmation before making non-emulator database changes. You MUST mention this safety requirement when providing commands or instructions that modify the database structure or data.

Quick Recipes

1. Querying Data

Use SQL for complex transforms or aggregations and key-value APIs for simpler query patterns. Note: Use exact match, prefix (_key LIKE 'myprefix%'), or range predicates on _key to avoid expensive unbounded scans. Recommend explicit row ranges (_key BETWEEN 'start' AND 'end') as a more performant alternative to prefix matches where possible.

If expensive scans (either unbounded or prefix or range queries scanning a large range) are unavoidable due to multiple access patterns that can’t all be accommodated in a single schema, consider one of these two options:

  • If the query will be used in user facing and/or latency sensitive applications, use continuous materialized views with keys optimized for the additional access patterns.
  • If secondary access patterns are infrequent, batch patterns like ETL, ML model training or analytical read-only tasks, use Bigtable Data Boost instead.

2. Manipulating Data

Use key-value APIs for insert, update, increment and delete operations. SQL API is read-only.

3. Data Model Definition (DDL)

SQL API doesn't support DDL operations. Table creation, deletion, updates should be made using gcloud CLI. Logical Views and Continuous Materialized Views are defined as SQL queries but they must be created using gcloud CLI.

Reference Guides

Common Workflows

Schema Evolution (DevOps)

  1. Prefer Terraform for production schema changes to prevent accidental data loss.

  2. For manual cbt changes, first check the existing state by listing the table's column families and GC policies before proposing any modifications:

    cbt ls {table}
    

    If modifications are needed, create the family or update the GC policy:

    cbt createfamily {table} {family}
    cbt setgcpolicy {table} {family} "maxversions=5 AND maxage=30d"
    
  3. Reference infrastructure_management.md for full syntax.

External Resources

Version History

  • aabe37a Current 2026-07-05 15:28

Same Skill Collection

skills/ads/data-manager-api/data-manager-api-audience-ingestion/SKILL.md
skills/ads/data-manager-api/data-manager-api-event-ingestion/SKILL.md
skills/ads/data-manager-api/data-manager-api-setup/SKILL.md
skills/ads/google-ads-api/google-ads-api-mcp-setup/SKILL.md
skills/ads/google-mobile-ads/google-mobile-ads-android-migrate-to-next-gen/SKILL.md
skills/ads/google-mobile-ads/google-mobile-ads-banner/SKILL.md
skills/ads/google-mobile-ads/google-mobile-ads-get-started/SKILL.md
skills/ads/google-mobile-ads/google-mobile-ads-interstitial/SKILL.md
skills/ads/google-mobile-ads/google-mobile-ads-rewarded/SKILL.md
skills/ads/interactive-media-ads/ima-sdk-basics/SKILL.md
skills/analytics/google-analytics-admin-api-basics/SKILL.md
skills/analytics/google-analytics-data-api-basics/SKILL.md
skills/cloud/agent-platform-endpoint-management/SKILL.md
skills/cloud/agent-platform-migrate-from-ai-studio/SKILL.md
skills/cloud/agent-platform-model-registry/SKILL.md
skills/cloud/agent-platform-prompt-management/SKILL.md
skills/cloud/agent-platform-rag-engine-management/SKILL.md
skills/cloud/agent-platform-skill-registry/SKILL.md
skills/cloud/agent-platform-tuning-management/SKILL.md
skills/cloud/agent-platform-tuning/SKILL.md
skills/cloud/alloydb-basics/SKILL.md
skills/cloud/bigquery-ai-ml/SKILL.md
skills/cloud/bigquery-basics/SKILL.md
skills/cloud/bigquery-bigframes/SKILL.md
skills/cloud/cloud-run-basics/SKILL.md
skills/cloud/detection-engineering-coverage-evaluation/SKILL.md
skills/cloud/firebase-basics/SKILL.md
skills/cloud/gcloud/SKILL.md
skills/cloud/gemini-agents-api/SKILL.md
skills/cloud/gemini-api/SKILL.md
skills/cloud/gemini-interactions-api/SKILL.md
skills/cloud/gke-app-onboarding/SKILL.md
skills/cloud/gke-backup-dr/SKILL.md
skills/cloud/gke-basics/SKILL.md
skills/cloud/gke-batch-hpc/SKILL.md
skills/cloud/gke-cluster-creation/SKILL.md
skills/cloud/gke-compute-classes/SKILL.md
skills/cloud/gke-cost/SKILL.md
skills/cloud/gke-golden-path/SKILL.md
skills/cloud/gke-inference/SKILL.md
skills/cloud/gke-multitenancy/SKILL.md
skills/cloud/gke-networking/SKILL.md
skills/cloud/gke-observability/SKILL.md
skills/cloud/gke-reliability/SKILL.md
skills/cloud/gke-scaling/SKILL.md
skills/cloud/gke-security/SKILL.md
skills/cloud/gke-storage/SKILL.md
skills/cloud/google-cloud-networking-observability/SKILL.md
skills/cloud/google-cloud-recipe-auth/SKILL.md
skills/cloud/google-cloud-recipe-onboarding/SKILL.md
skills/cloud/google-cloud-waf-cost-optimization/SKILL.md
skills/cloud/google-cloud-waf-operational-excellence/SKILL.md
skills/cloud/google-cloud-waf-performance-optimization/SKILL.md
skills/cloud/google-cloud-waf-reliability/SKILL.md
skills/cloud/google-cloud-waf-security/SKILL.md
skills/cloud/google-cloud-waf-sustainability/SKILL.md
skills/cloud/iam-recommendations-fetcher/SKILL.md
skills/ads/google-ads-api/google-ads-api-quickstart/SKILL.md
skills/cloud/agent-platform-alert-configuration/SKILL.md
skills/cloud/agent-platform-deploy/SKILL.md
skills/cloud/agent-platform-eval-flywheel/SKILL.md
skills/cloud/agent-platform-inference/SKILL.md
skills/cloud/cloud-sql-basics/SKILL.md
skills/cloud/datalineage-bigquery-asset-impact-analysis/SKILL.md
skills/cloud/gke-upgrades/SKILL.md
skills/cloud/google-agents-cli-onboarding/SKILL.md
skills/cloud/google-cloud-recipe-foundation-builder/SKILL.md
skills/cloud/workload-manager-basics/SKILL.md

Metadata

Files
0
Version
aabe37a
Hash
979515bd
Indexed
2026-07-05 15:28

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-10 07:55
浙ICP备14020137号-1 $Гость$