Start Data Comparison Task
Start the specified data comparison task and optionally pass advanced comparison settings for this execution.
Request URL: /openapi/v1/comparedata/execute
Request Method: POST
Before You Call
taskId can be obtained from data in the successful response of Create Data Comparison Task. After the task is started, if you need to query the execution details of this run, use data in the response as the execId for Query Data Comparison Subtask Details.
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| taskId | String | Yes | ID of the comparison task to start. | cd-tepmjmnj6o |
| compareOption | JSON | No | Advanced comparison configuration for this execution. Pass this object when you need to customize concurrency, precision, or string whitespace handling. | See the example below |
compareOption Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| parallel | Integer | Comparison parallelism. | 5 |
| splitNum | String | Amount of data processed in each split. | 1000 |
| differSize | String | Maximum number of difference records to store. | 1000 |
| floatPrecision | String | Precision setting for float fields. | 3 |
| doublePrecision | String | Precision setting for double fields. | 4 |
| stringTrimStrategy | String | Whitespace handling strategy for strings. LTrim removes left-side spaces, RTrim removes right-side spaces, and Trim removes spaces on both sides. | Trim |
| enabled | Boolean | Whether to enable advanced settings. If true, the values in compareOption are applied. | true |
How to Use the Returned Value
data in the successful response is the execId generated for this execution. Use this value when calling Query Data Comparison Subtask Details.
Request Example
{
"taskId": "cd-tepmjmnj6o",
"compareOption": {
"parallel": 5,
"splitNum": "1000",
"differSize": "1000",
"floatPrecision": "3",
"doublePrecision": "4",
"stringTrimStrategy": "Trim",
"enabled": true
}
}
Response Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | Whether the request is successful. | true |
| requestId | String | Request ID, which can be used for troubleshooting and tracing. | Ss1d8KLP-jppqeSZnkkrr3TWdlmc7PAK |
| data | Integer | Execution ID generated for this run, which is the execId used by the subtask query API. | 315337 |
Successful Invocation Example
{
"success": true,
"requestId": "Ss1d8KLP-jppqeSZnkkrr3TWdlmc7PAK",
"data": 315337
}