List tables

更新时间:
复制 MD 格式

Lists all tables in a specified namespace.

Notes

  • If you have a large number of tables, use the --max-tables parameter to limit the number of tables returned per request, and the --continuation-token parameter for pagination.

  • If the response includes a continuation-token, more tables are available. Pass this token to the --continuation-token parameter in your next request to retrieve the next page of results.

  • Use the --prefix parameter to return only the tables whose names start with a specific prefix.

Command format

ossutil tables-api list-tables --table-bucket-arn value --namespace value [--prefix value] [--max-tables value] [--continuation-token value] [flags]

Parameter

Type

Description

--continuation-token

string

The pagination token from a previous response. Use this token to retrieve the next page of results. Omit this parameter for the first request.

--max-tables

int

The maximum number of tables to return per request. The default and maximum values depend on server-side limits.

--namespace

string

The name of the namespace that contains the tables you want to list.

--prefix

string

Returns only tables with names that start with the specified prefix.

--table-bucket-arn

string

The ARN of the Table Bucket is in the format acs:osstables:{region}:{uid}:bucket/{bucket-name}.

Note
  • The list-tables command corresponds to the ListTables API operation. For details on the API parameters, see ListTables.

  • For supported global command-line options, see ossutil global options.

Examples

  • List all tables in a specified namespace.

    ossutil tables-api list-tables --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --namespace my_namespace
  • Filter table names by prefix to return only tables whose names start with test_.

    ossutil tables-api list-tables --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --namespace my_namespace --prefix test_
  • List tables and limit the results to a maximum of 10 per request.

    ossutil tables-api list-tables --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --namespace my_namespace --max-tables 10