LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cbt

command-line interface for Google Cloud Bigtable

TLDR

List all tables in an instance
$ cbt -project [project_id] -instance [instance_id] ls
copy
Read rows from a table
$ cbt -project [project_id] -instance [instance_id] read [table_name]
copy
Count rows in a table
$ cbt -project [project_id] -instance [instance_id] count [table_name]
copy
Create a new table
$ cbt -project [project_id] -instance [instance_id] createtable [table_name]
copy
Create a column family
$ cbt -project [project_id] -instance [instance_id] createfamily [table_name] [family_name]
copy
Write a value to a cell
$ cbt -project [project_id] -instance [instance_id] set [table_name] [row_key] [family]:[column]=[value]
copy

SYNOPSIS

cbt [-project project] [-instance instance] [-creds file] [-timeout duration] command [arguments...]

DESCRIPTION

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.

PARAMETERS

-project projectid_

Google Cloud project ID. Uses gcloud default if unset
-instance instanceid_
Cloud Bigtable instance name
-creds file
Path to credentials JSON file
-timeout duration
Operation timeout (e.g., 10s, 5m)
Common commands:ls - List tablesread table - Read rows from tablecount table - Count rows in tablecreatetable table - Create a tabledeletetable table - Delete a tablecreatefamily table family - Create column familyset table row family:col=val - Write cell valuedeleterow table row - Delete a rowhelp - Print help text

CONFIGURATION

~/.cbtrc

Default project and instance settings, avoiding the need to pass -project and -instance flags on every invocation.

CAVEATS

The cbt CLI does not implement smart retries or advanced error handling. For production environments, use a Bigtable client library or the Google Cloud console instead.Bash shell syntax rules apply: values with spaces or operators require quotes, and arbitrary byte values need dollar-sign prefix with single quotes.

HISTORY

The cbt tool was developed by Google as part of the Cloud Bigtable ecosystem, written in Go using the official Go client library for Bigtable. It provides a quick way to interact with Bigtable for development and debugging purposes.

SEE ALSO

gcloud(1), bq(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid