Reads the data in a time series.
Request syntax
message GetTimeseriesDataRequest {
required raw_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 raw_string 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 start of the time range to read. The value of this parameter is a timestamp that specifies the number of milliseconds that have elapsed since 00:00:00 UTC on January 1, 1970. |
end_time | int64 | No | The end of the time range to read.The value of this parameter is a timestamp that specifies the number of milliseconds that have elapsed since 00:00:00 UTC on January 1, 1970. |
specific_time | int64 | No | The specific point of time to read.The value of this parameter is a timestamp that specifies the number of milliseconds 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 rows of time series data that are 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 read data in a time series:
- Tablestore SDK for Java: GetTimeseriesData
- Tablestore SDK for Go: GetTimeseriesData