Summary:
Table command
```
yba universe table
Usage:
yba universe table [flags]
yba universe table [command]
Available Commands:
describe Describe a YugabyteDB Anywhere universe table
list List YugabyteDB Anywhere universe tables
namespace Manage YugabyteDB Anywhere universe table namespaces
tablespace Manage YugabyteDB Anywhere universe tablespaces
Flags:
-h, --help help for table
-n, --name string [Required] The name of the universe for the corresponding table operations.
Global Flags:
-a, --apiToken string YugabyteDB Anywhere api token.
--config string Config file, defaults to $HOME/.yba-cli.yaml
--debug Use debug mode, same as --logLevel debug.
--disable-color Disable colors in output. (default false)
-H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000")
-l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info")
-o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table")
--timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s)
--wait Wait until the task is completed, otherwise it will exit immediately. (default true)
```
Table list:
```
yba universe table list -h
List YugabyteDB Anywhere universe tables
Usage:
yba universe table list [flags]
Aliases:
list, ls
Examples:
yba universe table list --name <universe-name>
Flags:
--table-name string [Optional] Table name to be listed.
--include-parent-table-info [Optional] Include parent table information. (default false)
--include-colocated-parent-tables [Optional] Include colocated parent tables. (default true)
--xcluster-supported-only [Optional] Include only XCluster supported tables. (default false)
-h, --help help for list
Global Flags:
-a, --apiToken string YugabyteDB Anywhere api token.
--config string Config file, defaults to $HOME/.yba-cli.yaml
--debug Use debug mode, same as --logLevel debug.
--disable-color Disable colors in output. (default false)
-H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000")
-l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info")
-n, --name string [Required] The name of the universe for the corresponding table operations.
-o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table")
--timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s)
--wait Wait until the task is completed, otherwise it will exit immediately. (default true)
```
Table Describe
```
yba universe table describe -h
Describe a universe table in YugabyteDB Anywhere
Usage:
yba universe table describe [flags]
Aliases:
describe, get
Examples:
yba universe table describe --name <universe-name> --table-uuid <table-uuid>
Flags:
--table-uuid string [Required] The UUID of the table to be described.
-h, --help help for describe
Global Flags:
-a, --apiToken string YugabyteDB Anywhere api token.
--config string Config file, defaults to $HOME/.yba-cli.yaml
--debug Use debug mode, same as --logLevel debug.
--disable-color Disable colors in output. (default false)
-H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000")
-l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info")
-n, --name string [Required] The name of the universe for the corresponding table operations.
-o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table")
--timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s)
--wait Wait until the task is completed, otherwise it will exit immediately. (default true)
```
Namespace command:
```
yba universe table namespace -h
Manage YugabyteDB Anywhere universe table namespaces
Usage:
yba universe table namespace [flags]
yba universe table namespace [command]
Available Commands:
list List YugabyteDB Anywhere universe table namespaces
Flags:
-h, --help help for namespace
Global Flags:
-a, --apiToken string YugabyteDB Anywhere api token.
--config string Config file, defaults to $HOME/.yba-cli.yaml
--debug Use debug mode, same as --logLevel debug.
--disable-color Disable colors in output. (default false)
-H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000")
-l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info")
-n, --name string [Required] The name of the universe for the corresponding table operations.
-o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table")
--timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s)
--wait Wait until the task is completed, otherwise it will exit immediately. (default true)
Use "yba universe table namespace [command] --help" for more information about a command.
```
Namespace list:
```
yba universe table namespace list -h
List YugabyteDB Anywhere universe table namespaces
Usage:
yba universe table namespace list [flags]
Aliases:
list, ls
Examples:
yba universe table namespace list --name <universe-name>
Flags:
--namespace-name string [Optional] Namespace name to be listed.
--include-system-namespaces [Optional] Include system namespaces. (default false)
-h, --help help for list
Global Flags:
-a, --apiToken string YugabyteDB Anywhere api token.
--config string Config file, defaults to $HOME/.yba-cli.yaml
--debug Use debug mode, same as --logLevel debug.
--disable-color Disable colors in output. (default false)
-H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000")
-l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info")
-n, --name string [Required] The name of the universe for the corresponding table operations.
-o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table")
--timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s)
--wait Wait until the task is completed, otherwise it will exit immediately. (default true)
```
Tablespace command:
```
Manage YugabyteDB Anywhere universe tablespaces
Usage:
yba universe table tablespace [flags]
yba universe table tablespace [command]
Available Commands:
describe Describe a YugabyteDB Anywhere universe tablespace
list List YugabyteDB Anywhere universe tablespaces
Flags:
-h, --help help for tablespace
Global Flags:
-a, --apiToken string YugabyteDB Anywhere api token.
--config string Config file, defaults to $HOME/.yba-cli.yaml
--debug Use debug mode, same as --logLevel debug.
--disable-color Disable colors in output. (default false)
-H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000")
-l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info")
-n, --name string [Required] The name of the universe for the corresponding table operations.
-o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table")
--timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s)
```
Tablespace list:
```
yba universe table tablespace list -h
List YugabyteDB Anywhere universe tablespaces
Usage:
yba universe table tablespace list [flags]
Aliases:
list, ls
Examples:
yba universe table tablespace list --name <universe-name>
Flags:
--tablespace-name string [Optional] Tablespace name to be listed.
-h, --help help for list
Global Flags:
-a, --apiToken string YugabyteDB Anywhere api token.
--config string Config file, defaults to $HOME/.yba-cli.yaml
--debug Use debug mode, same as --logLevel debug.
--disable-color Disable colors in output. (default false)
-H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000")
-l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info")
-n, --name string [Required] The name of the universe for the corresponding table operations.
-o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table")
--timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s)
--wait Wait until the task is completed, otherwise it will exit immediately. (default true)
```
Tablespace describe:
```
yba universe table tablespace get
Describe a universe tablespace in YugabyteDB Anywhere
Usage:
yba universe table tablespace describe [flags]
Aliases:
describe, get
Examples:
yba universe table tablespace describe --name <universe-name> --tablespace-name <tablespace-name>
Flags:
--tablespace-name string [Required] The Name of the tablespace to be described.
-h, --help help for describe
Global Flags:
-a, --apiToken string YugabyteDB Anywhere api token.
--config string Config file, defaults to $HOME/.yba-cli.yaml
--debug Use debug mode, same as --logLevel debug.
--disable-color Disable colors in output. (default false)
-H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000")
-l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info")
-n, --name string [Required] The name of the universe for the corresponding table operations.
-o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table")
--timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s)
--wait Wait until the task is completed, otherwise it will exit immediately. (default true)
```
Test Plan:
`yba universe table list -n dkumar-cli`
```
Table Name Table UUID Table ID Table Type SST size (in bytes) WAL Size (in bytes) KeySpace PG Schema Name
cassandrakeyvalue a2536b8d-b72f-47ac-9aae-1945bd9da349 a2536b8db72f47ac9aae1945bd9da349 YQL_TABLE_TYPE 43045150.00 218905229.00 ybdemo_keyspace
postgresqlkeyvalue 00000005-0000-3000-8000-000000004000 00000005000030008000000000004000 PGSQL_TABLE_TYPE 45173175.00 48641101.00 postgres public
```
`yba universe table get -n dkumar-cli --table-uuid 00000005-0000-3000-8000-000000004000 `
```
General
Table Name Table UUID Table Type KeySpace
postgresqlkeyvalue 00000005-0000-3000-8000-000000004000 PGSQL_TABLE_TYPE postgres
TTL (in seconds, -1 represents infinite TTL)
-1
Split Values (Primary key values used to split table into tablets)
-
Columns
Column 1: Details
Name Type Key Type Value Type Relative position for this column, in the table and in CQL commands
k VARCHAR 0
Is Clustering Key Sort Order Is Partition Key
false NONE true
Column 2: Details
Name Type Key Type Value Type Relative position for this column, in the table and in CQL commands
v VARCHAR 1
Is Clustering Key Sort Order Is Partition Key
false NONE false
```
` yba universe table namespace list --name dkumar-cli`
```
Namespace Name Namespace UUID Table Type
ybdemo_keyspace 043e85dd-09e3-4287-af7d-8b3cd5d3d82c YQL_TABLE_TYPE
postgres 00000005-0000-3000-8000-000000000000 PGSQL_TABLE_TYPE
yugabyte 000034cb-0000-3000-8000-000000000000 PGSQL_TABLE_TYPE
```
`yba universe table tablespace ls -n dkumar-cli`
```
Tablespace Name Number of Replicas Placement Blocks
us_west_tablespace 1 us-west1
us_west_2_tablespace 1 us-west-2
```
`yba universe table tablespace get -n dkumar-cli --tablespace-name us_west_tablespace`
```
General
Tablespace Name Number of Replicas
us_west_tablespace 1
Placement Blocks
Placement Block 1: Details
Cloud Region Zone Leader Preference Minimum Number of Replicas
aws us-west1 us-west1-a 0 1
```
Reviewers: skurapati
Reviewed By: skurapati
Subscribers: yugaware
Differential Revision: https://phorge.dev.yugabyte.com/D41187