All Products
Search
Document Center

Tablestore:Query table information

Last Updated:Jul 22, 2026

Tablestore SDK for Java retrieves a table's schema, settings, Stream status, encryption settings, reserved throughput, and secondary index metadata.

Prerequisites

Install the Tablestore SDK for Java and initialize the client.

Function description

public DescribeTableResponse describeTable(DescribeTableRequest request) throws TableStoreException, ClientException

describeTable() returns a DescribeTableResponse that contains information about the specified table.

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

DescribeTableRequest request = new DescribeTableRequest("example_table");
DescribeTableResponse response = client.describeTable(request);

System.out.println("Table metadata: " + response.getTableMeta());
System.out.println("Table options: " + response.getTableOptions());
System.out.println("Stream details: " + response.getStreamDetails());
SSEDetails sseDetails = response.getSseDetails();
System.out.println("Encryption enabled: " + sseDetails.isEnable());
if (sseDetails.isEnable()) {
    System.out.println("Encryption type: " + sseDetails.getKeyType());
}
System.out.println("Reserved throughput: " + response.getReservedThroughputDetails());
System.out.println("Secondary indexes: " + response.getIndexMeta());
System.out.println("Partition split points: " + response.getShardSplits());
System.out.println("Creation time: " + response.getCreationTime());

Parameters

DescribeTableRequest contains the following parameter.

  • tableName (required) String: The name of the table.

Response

DescribeTableResponse contains the following information.

Field

Type

Description

tableMeta

TableMeta

Call getTableMeta() to retrieve the table schema, including the table name, primary key columns, predefined columns, and table IDs.

reservedThroughputDetails

ReservedThroughputDetails

Call getReservedThroughputDetails() to retrieve the current reserved throughput and the times of the latest increase and decrease.

tableOptions

TableOptions

Call getTableOptions() to retrieve the table settings, including the time to live, maximum number of versions, maximum time deviation, whether updates are allowed, and whether updates must include the entire row.

shardSplits

List<PrimaryKey>

Call getShardSplits() to retrieve the split points between table shards.

streamDetails

StreamDetails

Call getStreamDetails() to retrieve the Stream settings, including whether Stream is enabled, the Stream ID, the expiration time, when Stream was most recently enabled, and the original columns.

sseDetails

SSEDetails

Call getSseDetails() to retrieve the server-side encryption settings, including whether encryption is enabled, the key type, key ID, and RAM role ARN.

indexMeta

List<IndexMeta>

Call getIndexMeta() to retrieve the secondary index metadata, including the index name, primary key columns, predefined columns, index type, update mode, and synchronization phase.

creationTime

long

Call getCreationTime() to retrieve the table creation time in microseconds.