Queries the incremental data of a shard.

Request syntax

message GetStreamRecordRequest {
    required string shard_iterator = 1;
    optional int32 limit = 2;
}            
Parameter Type Required Description
shard_iterator string Yes The iterator that is used to read the incremental data of the shard.
limit int32 No The maximum number of data records that you want to return.

Response syntax

message GetStreamRecordResponse {
    message StreamRecord {
        required ActionType action_type = 1;
        required bytes record = 2;
    }
    repeated StreamRecord stream_records = 1;
    optional raw_string next_shard_iterator = 2;
    optional ConsumedCapacity consumed = 3;
}
            
Parameter Type Description
StreamRecord repeated StreamRecord The record entry that is used to read data from the current shard.
shard_iterator string The iterator that is used to read data from the current shard in the next GetStreamRecord request.
consumed ConsumedCapacity The number of capacity units (CUs) that are consumed to read stream data is rounded up from the value that is calculated by using the following formula: Number of consumed read CUs = Total size of data in all rows that are read/4 KB. For more information about how to calculate the total size of data in all rows that are actually read, see Storage usage.

Use Tablestore SDKs

Tablestore SDK for Java: GetStreamRecord