All Products
Search
Document Center

Tablestore:Query analytical store information

Last Updated:Aug 04, 2026

Use Tablestore SDK for Java to query the configuration, data synchronization status, and storage usage of an analytical store.

Prerequisites

Install Tablestore SDK for Java and initialize a time series model client. Analytical store operations require Tablestore SDK for Java 5.15.0 or later. We recommend that you use the latest version.

Feature description

Call the describeTimeseriesAnalyticalStore method to query the TTL, synchronization mode, synchronization status, and storage usage of an analytical store.

public DescribeTimeseriesAnalyticalStoreResponse describeTimeseriesAnalyticalStore(DescribeTimeseriesAnalyticalStoreRequest request) throws TableStoreException, ClientException

The following sample code queries information about example_analytical_store in example_timeseries_table. The synchronization status or storage usage can be empty before the corresponding information is generated.

TimeseriesClient timeseriesClient = client.asTimeseriesClient();

DescribeTimeseriesAnalyticalStoreRequest request =
        new DescribeTimeseriesAnalyticalStoreRequest(
                "example_timeseries_table", "example_analytical_store");
DescribeTimeseriesAnalyticalStoreResponse response =
        timeseriesClient.describeTimeseriesAnalyticalStore(request);

TimeseriesAnalyticalStore store = response.getAnalyticalStore();
System.out.println(store.getAnalyticalStoreName());
System.out.println(store.getTimeToLive());
System.out.println(store.getSyncOption());

AnalyticalStoreSyncStat syncStat = response.getSyncStat();
if (syncStat != null) {
    System.out.println(syncStat.getSyncPhase());
    System.out.println(syncStat.getCurrentSyncTimestamp());
}

AnalyticalStoreStorageSize storageSize = response.getStorageSize();
if (storageSize != null) {
    System.out.println(storageSize.getSizeInBytes());
    System.out.println(storageSize.getTimestamp());
}

Parameters

DescribeTimeseriesAnalyticalStoreRequest contains the following parameters.

Name

Type

Description

timeseriesTableName (required)

String

The name of the time series table.

analyticalStoreName (required)

String

The name of the analytical store.

Response

DescribeTimeseriesAnalyticalStoreResponse contains the following business fields.

Field

Type

Description

analyticalStore

TimeseriesAnalyticalStore

Call getAnalyticalStore() to obtain the analytical store configuration.

syncStat

AnalyticalStoreSyncStat

Call getSyncStat() to obtain the data synchronization status. This field can be empty before synchronization status is generated.

storageSize

AnalyticalStoreStorageSize

Call getStorageSize() to obtain the latest storage usage statistics. This field can be empty before storage usage statistics are generated.

Analytical store configuration

analyticalStore is of the TimeseriesAnalyticalStore type and contains the following fields.

Field

Type

Description

analyticalStoreName

String

Call getAnalyticalStoreName() to obtain the name of the analytical store.

timeToLive

int

Call getTimeToLive() to obtain the analytical store TTL in seconds. A value of -1 means that data does not expire.

syncOption

AnalyticalStoreSyncType

Call getSyncOption() to obtain the data synchronization mode.

Data synchronization status

syncStat is of the AnalyticalStoreSyncStat type and contains the following fields.

Field

Type

Description

syncPhase

AnalyticalStoreSyncType

Call getSyncPhase() to obtain the current synchronization phase. Valid values: SYNC_TYPE_FULL and SYNC_TYPE_INCR.

currentSyncTimestamp

long

Call getCurrentSyncTimestamp() to obtain the current synchronization timestamp.

Storage usage

storageSize is of the AnalyticalStoreStorageSize type and contains the following fields.

Field

Type

Description

sizeInBytes

long

Call getSizeInBytes() to obtain the amount of data in the analytical store, in bytes.

timestamp

long

Call getTimestamp() to obtain the timestamp when storage usage was collected.