All Products
Search
Document Center

Tablestore:Query table information

Last Updated:Aug 04, 2026

Use Tablestore SDK for Python to query a table's schema, configurations, encryption settings, reserved throughput, and secondary indexes.

Prerequisites

Install the Tablestore SDK for Python and initialize a client.

Function description

Call the describe_table method to query a table. The method returns a DescribeTableResponse that contains the current table information.

def describe_table(self, table_name)

The following example queries example_table and prints the main fields in the response.

response = client.describe_table("example_table")

print("Table metadata:", response.table_meta)
print("Table options:", response.table_options)
print("Encryption settings:", response.sse_details)
print(
    "Reserved throughput:",
    response.reserved_throughput_details,
)
print("Secondary indexes:", response.secondary_indexes)

Parameters

The describe_table method contains the following parameter.

Name

Type

Description

table_name (required)

str

The name of the table.

Response

DescribeTableResponse contains the following business information.

Field

Type

Description

table_meta

TableMeta

The table schema, including the table name, primary key columns, and predefined columns.

table_options

TableOptions

The table configurations, including the TTL, maximum number of versions, maximum version deviation, and whether updates are allowed.

reserved_throughput_details

ReservedThroughputDetails

The current reserved throughput and the times of the latest increase and decrease.

secondary_indexes

List[SecondaryIndexMeta]

The secondary index metadata, including the index name, primary key columns, predefined columns, and index type.

sse_details

SSEDetails

The server-side encryption settings, including the enablement status, key type, key ID, and RAM role ARN.