btcli

module
Version: v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2019 License: MIT

README

GoDoc CircleCI Go Report Card

btcli

CLI client for the Bigtable with auto-completion.

tty

Features

btcli is the cloud bigtable client tool. Connect to your bigtable instances and any read items with auto-completion.

write commands are not implemented yet

Compare to cbt

cbt is an official bigtable client tool

  • btcli has auto-completion
  • btcli can decode a big-endian values
  • btcli has a filter for value, version and family
  • A print format that same as the cbt

Installation

go get -u github.com/takashabe/btcli/cmd/btcli

Require go1.11 or later and GO111MODULE environemnts

Usage

Connect to bigtable
btcli -project <GCP_PROJECT_NAME> -instance <BIGTABLE_INSTANCE_ID> -creds <GCP_CREDENTIAL_FILE>

-creds e.g. ~/.config/gcloud/application_default_credentials.json

Subcommand and options
  • ls

List tables

ls          List tables
  • count

Count rows in a table

count <table>
  • lookup

Read from a single row

lookup <table> <row> [family=<column_family>] [version=<n>]
        version        Read only latest <n> columns
        decode         Decode big-endian value
        decode-columns Decode big-endian value with columns. <column_name:<string|int|float>[,<column_name:...>]
  • read

Read rows

read <table> [start=<row>] [end=<row>] [prefix=<prefix>] [family=<column_family>] [version=<n>]
        start          Start reading at this row
        end            Stop reading before this row
        prefix         Read rows with this prefix
        value          Read rows with has value
        family         Read only columns family with <columns_family>
        version        Read only latest <n> columns
        from           Read cells whose version is newer than or equal to this unixtime
        to             Read cells whose version is older than this unixtime
        decode         Decode big-endian value
        decode-columns Decode big-endian value with columns. <column_name:<string|int|float>[,<column_name:...>]
Environments
Env Detail
BTCLI_DECODE_TYPE set the default decoding type.
values: string, int, float

Support commands

Read commands
  • ls
  • count
  • lookup
    • version
    • decode
    • decode-columns
  • read
    • start
    • end
    • prefix
    • value
    • family
    • version
    • from
    • to
    • decode
    • decode-columns
Write commands
  • createfamily
  • createtable
  • deletecolumn
  • deletefamily
  • deleterow
  • deletetable
  • set
  • setgcpolicy
Others
  • help

Directories

Path Synopsis
cmd
pkg
bigtable
Package bigtable is a generated GoMock package.
Package bigtable is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL