In the BatchGetRow operation, TableInBatchGetRowRequest indicates a request to read the data in a table.

Data structure

message TableInBatchGetRowRequest {
    required string table_name = 1;
    repeated bytes primary_key = 2; // The primary key columns are encoded in the PlainBuffer format.
    repeated bytes token = 3;
    repeated string columns_to_get = 4;  // If this parameter is not specified, all columns are read.
    optional TimeRange time_range = 5;
    optional int32 max_versions = 6;
    optional bool cache_blocks = 7 [default = true]; // This parameter specifies whether the read data is written to BlockCache.
    optional bytes filter = 8;
    optional string start_column = 9;
    optional string end_column = 10;
}
Parameter Type Required Description
table_name string Yes The name of the table.
primary_key repeated bytes Yes All the primary key columns of the row, including the primary key column names and values. The primary key columns are encoded in the PlainBuffer format. For more information about PlainBuffer, see PlainBuffer.
token repeated bytes No The start position of a wide row in the next read request. This parameter is unavailable.
columns_to_get repeated string No The names of the columns to return.
time_range TimeRange At least one of time_range and max_versions is required. The timestamp range of data to read.
  • The minimum value is 0, and the maximum value is INT64.MAX. Unit: milliseconds.
  • To query the data within a time range, specify start_time and end_time.
  • To query the data with a specific timestamp, specify specific_time.

Example: If the value of time_range is [100, 200), the timestamp of the data in the returned column must be within the range of [100, 200).

max_versions int32 At least one of max_versions and time_range is required. The maximum number of versions of data to return.

Example: If the value of max_versions is 2, a maximum of two versions of data is returned for each column.

cache_blocks bool No Specifies whether the read data is written to BlockCache. The default value is true. You cannot set the value to false in the current version.
filter bytes No The expression of the filter condition. The expression of the filter condition is serialized as binary data by using Protobuf. For more information, see Filter.
start_column string No The column from which the read starts in a row. This parameter is used to read wide rows.
  • The response contains the specified start column.
  • The columns are sorted based on their names in alphabetical order.

Example: If a table contains columns a, b, and c, and the value of start_column is b, the current read starts from column b, and columns b and c are returned.

end_column string No The column at which the read ends in the row. This parameter is used to read wide rows.
  • The response does not contain the specified end column.
  • The columns are sorted based on their names in alphabetical order.

Example: If a table contains columns a, b, and c, and the value of end_column is b, the current read ends at column b, and only column a is returned.

Related operation

BatchGetRow