← 返回命令列表

Linux command

cbt 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

List all tables in an instance

cbt -project [project_id] -instance [instance_id] ls

Read rows from a table

cbt -project [project_id] -instance [instance_id] read [table_name]

Count rows in a table

cbt -project [project_id] -instance [instance_id] count [table_name]

Create a new table

cbt -project [project_id] -instance [instance_id] createtable [table_name]

Create a column family

cbt -project [project_id] -instance [instance_id] createfamily [table_name] [family_name]

Write a value to a cell

cbt -project [project_id] -instance [instance_id] set [table_name] [row_key] [family]:[column]=[value]

说明

cbt is a command-line interface for Google Cloud Bigtable, a fully managed NoSQL database service. It allows performing administrative and data operations on Bigtable instances, tables, column families, and rows. The tool can be configured via a ~/.cbtrc file containing project and instance defaults, or by passing flags directly.

参数

-project _project_id_
Google Cloud project ID. Uses gcloud default if unset
-instance _instance_id_
Cloud Bigtable instance name
-creds _file_
Path to credentials JSON file
-timeout _duration_
Operation timeout (e.g., 10s, 5m)

FAQ

What is the cbt command used for?

cbt is a command-line interface for Google Cloud Bigtable, a fully managed NoSQL database service. It allows performing administrative and data operations on Bigtable instances, tables, column families, and rows. The tool can be configured via a ~/.cbtrc file containing project and instance defaults, or by passing flags directly.

How do I run a basic cbt example?

Run `cbt -project [project_id] -instance [instance_id] ls` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -project _project_id_ do in cbt?

Google Cloud project ID. Uses gcloud default if unset