Forrest logo
back to the cbt tool

cbt:tldr:5f884

cbt: Display a single row with only specific column(s) (omit qualifier to return entire family) in the current project.
$ cbt lookup "${table_name}" "${row_key}" columns="${family1:qualifier1,family2:qualifier2,---}"
try on your machine

The given command seems to be using the "cbt" command-line tool to perform a lookup operation on a particular row in a table. Here's how the different parts of the command work:

  • "cbt" is a command-line tool used for interacting with Google Cloud Bigtable.
  • "lookup" is a command provided by the "cbt" tool to look up a specific row in a table.
  • "${table_name}" represents the name of the table in which the lookup operation needs to be performed. It is expected to be replaced with the actual name of the table.
  • "${row_key}" represents the key of the row that needs to be looked up. It is expected to be replaced with the actual row key value.
  • "columns=" is an option used to specify the columns to be included in the lookup operation. It follows a specific format: "column_family:qualifier,column_family:qualifier,...". The column family and qualifier values are separated by a colon (":"). Multiple column families and qualifiers can be specified, separated by commas (","). It is expected to be replaced with the actual column family and qualifier values.

For example, if we have a table named "employees" with the row key "1001" and we want to look up the columns "info:name", "info:age", and "income:salary", the command would look like this:

cbt lookup "employees" "1001" columns="info:name,info:age,income:salary"

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the cbt tool