Parameter | Description | Required | Default value |
column | The names of the columns that you want to synchronize. Specify the names in a JSON array. Tablestore is a NoSQL database service. You must specify column names for Tablestore Reader to read data. You can specify common columns. For example, you can specify {"name":"col1"} for Tablestore Reader to read data from column 1. You can specify specific columns. Tablestore Reader reads data only from the specified columns. You can specify constant columns. For example, you can specify {"type":"STRING", "value":"DataX"} for Tablestore Reader to read data from the column in which data is of the STRING type and the value is DataX. The type parameter specifies the data type of the constant. The supported data types are STRING, INT, DOUBLE, BOOLEAN, BINARY, INF_MIN, and INF_MAX. If the data type of the constant is BINARY, the constant value must be Base64-encoded. INF_MIN indicates the minimum value specified by Tablestore, and INF_MAX indicates the maximum value specified by Tablestore. If you set the type to INF_MIN or INF_MAX, do not configure the value parameter. If you configure the value parameter, errors may occur. You cannot specify a function or a custom expression. This is because Tablestore does not provide functions or expressions that are similar to those of SQL. Tablestore Reader cannot read data from columns that contain functions or expressions.
| Yes | No default value |
begin and end | The parameters specify the range of the data that you want to read. The begin and end parameters specify the data read range for primary key columns in the Tablestore table. If you do not need to limit a range, specify the begin and end parameters as {"type":"INF_MIN"} and {"type":"INF_MAX"} . The type parameter specifies the data type of the data that you want to read. Note The default values for the begin and end parameters are [INF_MIN,INF_MAX) . The setting indicates that all data in the Tablestore table is read. If the number of ranges specified by the begin and end parameters is less than the number of primary key columns, the leftmost primary key column matching principle is used. For data in the primary key columns for which the begin and end parameters are not configured, the values [INF_MIN,INF_MAX) are used by default. If only the begin parameter or the end parameter is configured for the Tablestore table from which you want to read data, the data read range is [begin,INF_MAX) or [INF_MIN,end) . If the Tablestore table from which you want to read data contains only one primary key column, the data read range specified by the begin and end parameters is a left-closed, right-open interval. If the Tablestore table from which you want to read data contains multiple primary key columns, the data read range specified by the begin and end parameters for the last primary key column is a left-closed, right-open interval, and the data read range specified by the begin and end parameters for the rest of primary key columns is a left-closed, right-closed interval.
For example, you read data from a Tablestore table with three primary key columns [Hundreds,Tens,Ones] . The values of the primary key columns are (0,0,0)(0,0,1)(0,0,2)(0,0,3)......(9,9,8)(9,9,9), and the table consists of 1000 columns. In this case, you can specify the begin and end parameters in the following scenarios: Example 1: You read data from the Tablestore table based on the data read range [3,5] specified for the Hundreds primary key column and the data read range [4,6] specified for the Tens primary key column. The values of the primary key columns for the data you read are (3,4,0)(3,4,1)...(4,4,0),(4,0,1)...(5,6,8)(5,6,9) . Configuration details:
"range": {
"begin": [
{"type":"INT", "value":"3"},
{"type":"INT", "value":"4"}
],
"end": [
{"type":"INT", "value":"5"},
{"type":"INT", "value":"6"}
]
}
Example 2: You read data from the Tablestore table based on the data read range [3,5] specified for the Hundreds primary key column, the data read range [4,6] specified for the Tens primary key column, and the data read range [5,7) specified for the Ones primary key column. The values of the primary key columns for the data you read are (3,4,5)(3,4,6)...(4,4,5),(4,4,6)...(5,6,5)(5,6,6) . Configuration details:
"range": {
"begin": [
{"type":"INT", "value":"3"},
{"type":"INT", "value":"4"},
{"type":"INT", "value":"5"}
],
"end": [
{"type":"INT", "value":"5"},
{"type":"INT", "value":"6"},
{"type":"INT", "value":"7"}
]
}
| No | (INF_MIN,INF_MAX) |
split | The custom rule for data sharding. This parameter is an advanced configuration item. We recommend that you do not configure this parameter in common scenarios. You can configure this parameter to customize the data range of shards. If data is unevenly distributed in a Tablestore table, you can customize a sharding rule. Sample configuration:
{
"range": {
"begin": [{"type": "INF_MIN"}],
"end": [{"type": "INF_MAX"}],
"split": [
{"type": "STRING","value": "1"},
{"type": "STRING","value": "2"},
{"type": "STRING","value": "3"},
{"type": "STRING","value": "4"},
{"type": "STRING","value": "5"}
]
}
Data is split into six segments when a data synchronization task is run and the data synchronization task uses Tablestore Reader to read the data by using parallel threads. We recommend that the number of data segments is greater than the number of threads that can be run in parallel for the data synchronization task.
[Minimum value,1)
[1, 2)
[2, 3)
[3, 4)
[4, 5)
[5,Maximum value)
| No | If you do not configure the split parameter, the automatic splitting logic is used. The automatic splitting logic identifies the maximum value and minimum value of a partition key column, and evenly splits data into segments. The INTEGER and STRING data types are supported for data in a partition key column. Exact division is used to split data of the INTEGER data type in a partition key column into segments. The Unicode of the first character is used to split data of the STRING data type in a partition key column into segments. |