Batch exports data.
Request syntax
message BulkExportRequest {
required string table_name = 1;
repeated string columns_to_get = 2;
required bytes inclusive_start_primary_key = 3;
required bytes exclusive_end_primary_key = 4;
optional bytes filter = 5;
optional DataBlockType data_block_type_hint = 6 [default = DBT_SIMPLE_ROW_MATRIX];
}
Parameter | Type | Required | Description |
table_name | string | Yes | The name of the data table. |
columns_to_get | string | No | The columns that you want to export. If you do not specify this parameter, all columns are exported. |
inclusive_start_primary_key | bytes | Yes | The start primary key encoded in the PlainBuffer format. For more information, see PlainBuffer. If the row exists, the row is included in the response. |
exclusive_end_primary_key | bytes | Yes | The end primary key encoded in the PlainBuffer format. For more information, see PlainBuffer. The row is not included in the response regardless of whether the row exists. |
filter | bytes | No | The filter condition encoded in the PlainBuffer format. For more information, see PlainBuffer. |
data_block_type_hint | No | The data block type of the returned result. |
Response syntax
message BulkExportResponse {
required ConsumedCapacity consumed = 1;
required bytes rows = 2;
optional bytes next_start_primary_key = 3;
optional DataBlockType data_block_type = 4;
}
Parameter | Type | Required | Description |
consumed | Yes | The number of capacity units (CUs) that are consumed by the operation. For more information, see CU consumption. | |
rows | bytes | Yes | The exported row data, including the primary key and attribute columns. The row data is encoded in the PlainBuffer format. For more information, see PlainBuffer. |
next_start_primary_key | bytes | No | The start primary key for the next read operation. The start primary key is encoded in the PlainBuffer format. For more information, see PlainBuffer. If the return value is empty, all data is read. |
data_block_type | No | The data block type of the returned result. |
Use Tablestore SDKs
CU consumption:
If the requested row does not exist, one read CU is consumed.
If the requested row exists, the number of consumed read CUs is rounded up from the calculation result of the following formula: Number of consumed read CUs = (Size of data in all primary key columns of the row + Size of data in the attribute columns that are read)/4 KB. For more information about how to calculate the data size, see Storage usage.
If the request times out and the results are undefined, CUs may or may not be consumed.
If an HTTP status code 5xx is returned, which indicates that an internal error occurred, the operation does not consume CUs. If other errors are returned, one read CU is consumed.