All Products
Search
Document Center

Tablestore:GetTimeseriesData

Last Updated:Jul 26, 2024

Queries the data in a time series.

Request syntax

message GetTimeseriesDataRequest {
  required string table_name = 1;
  required TimeseriesKey time_series_key = 2;
  optional int64 begin_time = 3;
  optional int64 end_time = 4;
  optional int64 specific_time = 5; // not used
  optional bytes token = 6; // bytes
  optional int32 limit = 7;
  optional bool backward = 8;
  repeated TimeseriesFieldsToGet fields_to_get = 9;
}

Parameter

Type

Required

Description

table_name

string

Yes

The name of the time series table.

time_series_key

TimeseriesKey

Yes

The identifier of the time series.

begin_time

int64

No

The beginning of the time range to query. The value of this parameter is a timestamp that specifies the number of microseconds that have elapsed since 00:00:00 UTC on January 1, 1970.

end_time

int64

No

The end of the time range to query. The value of this parameter is a timestamp that specifies the number of microseconds that have elapsed since 00:00:00 UTC on January 1, 1970.

specific_time

int64

No

The specific point in time to query. The value of this parameter is a timestamp that specifies the number of microseconds that have elapsed since 00:00:00 UTC on January 1, 1970.

token

bytes

No

The token that is used to read the remaining data.

limit

int32

No

The maximum number of rows that you want to return.

backward

bool

No

Specifies whether to read data in reverse chronological order. By default, data is read in chronological order.

fields_to_get

TimeseriesFieldsToGet

No

The data columns that you want to read.

Response syntax

message GetTimeseriesDataResponse {
  required bytes rows_data = 1;
  optional bytes next_token = 2;
}

Parameter

Type

Description

rows_data

bytes

The time series data returned.

next_token

bytes

The token that is used to read the remaining data.

Use Tablestore SDKs

You can use the following Tablestore SDKs to query the data in a time series: