Skip to main content

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

ParameterTypeRequiredDescriptionExample
taskIdStringYesID of the comparison task to start.cd-tepmjmnj6o
compareOptionJSONNoAdvanced 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

ParameterTypeDescriptionExample
parallelIntegerComparison parallelism.5
splitNumStringAmount of data processed in each split.1000
differSizeStringMaximum number of difference records to store.1000
floatPrecisionStringPrecision setting for float fields.3
doublePrecisionStringPrecision setting for double fields.4
stringTrimStrategyStringWhitespace handling strategy for strings. LTrim removes left-side spaces, RTrim removes right-side spaces, and Trim removes spaces on both sides.Trim
enabledBooleanWhether 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

ParameterTypeDescriptionExample
successBooleanWhether the request is successful.true
requestIdStringRequest ID, which can be used for troubleshooting and tracing.Ss1d8KLP-jppqeSZnkkrr3TWdlmc7PAK
dataIntegerExecution 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
}