All Products
Search
Document Center

Tablestore:Query information of an analytical store

Last Updated:Apr 24, 2025

If an analytical store is created when you create a time series table, you can call the DescribeTimeseriesAnalyticalStore operation to query information of the analytical store, such as the time to live (TTL) configuration, data synchronization option, data synchronization status, and data storage usage.

Prerequisites

Parameters

Parameter

Description

timeseriesTableName

The name of the time series table.

analyticalStoreName

The name of the analytical store.

Example

The following sample code provides an example on how to query information of the test_analytical_store analytical store created for the time series table named test_timeseries_table:

public void describeAnalyticalStore(TimeseriesClient client) {
    //Specify the names of the time series table and analytical store.
    DescribeTimeseriesAnalyticalStoreRequest request = new DescribeTimeseriesAnalyticalStoreRequest("test_timeseries_table", "test_analytical_store");
    DescribeTimeseriesAnalyticalStoreResponse response = client.describeTimeseriesAnalyticalStore(request);
    //Print the name of the analytical store.
    System.out.println("AnalyticalStoreName: " + response.getAnalyticalStore().getAnalyticalStoreName());
    //Print the TTL of the analytical store in seconds.
    System.out.println("TimeToLive: " + response.getAnalyticalStore().getTimeToLive());
    //Print the synchronization option of the analytical store.
    System.out.println("SyncOption: " + response.getAnalyticalStore().getSyncOption());
    //Print the current synchronization phase of the analytical store.
    if (response.getSyncStat() != null) {
        System.out.println("SyncPhase: " + response.getSyncStat().getSyncPhase());
        System.out.println("CurrentSyncTimestamp: " + response.getSyncStat().getCurrentSyncTimestamp());
    }
    //Print the current storage usage of the analytical store.
    if (response.getStorageSize() != null) {
        System.out.println("StorageSize: " + response.getStorageSize().getSizeInBytes());
        System.out.println("StorageSizeTimestamp: " + response.getStorageSize().getTimestamp());
    }
}