Query Data Comparison Main Task Details
Query the configuration and latest execution information of a specified data comparison main task.
Request URL: /openapi/v1/comparedata/queryTaskById
Request Method: GET
Before You Call
taskId can be obtained from data in the successful response of Create Data Comparison Task.
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| taskId | String | Yes | ID of the comparison task to query. In most cases, this comes from data in the successful response of Create Data Comparison Task. | cd-tepmjmnj6o |
How to Use the Returned Value
data.id is the taskId of the current task and can be reused in Stop Data Comparison Task and Delete Data Comparison Task. data.lastExecId can be used directly as the execId for Query Data Comparison Subtask Details.
Request Example
{
"taskId": "cd-tepmjmnj6o"
}
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. | Hs1z8TSZ-jppqeJUnkkrg5BNdlnx3OSO |
| data | Object | Main task details object. | See the field descriptions below |
Main Task Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| id | String | Data comparison task ID. It is the same as the requested taskId. | cd-tepmjmnj6o |
| lastExecId | String | ID of the latest execution subtask, which can be used to query subtask details. | 315337 |
| status | String | Task status. success means completed, failed means failed, starting means starting, and running means running. | starting |
| name | String | Task name. | compare-docx-proof-20260508163538 |
| isDeleted | Boolean | Whether the task is in a deleted state. | false |
| errMsg | String | Error message. It usually contains details when the task fails or encounters an exception. | "" |
Successful Invocation Example
{
"success": true,
"requestId": "Hs1z8TSZ-jppqeJUnkkrg5BNdlnx3OSO",
"data": {
"id": "cd-tepmjmnj6o",
"lastExecId": 315337,
"type": "data",
"sourceDsId": "ds-ct192k3jlj4f",
"targetDsId": "ds-d37s953l33d3",
"status": "starting",
"objectConfig": {
"all": false,
"databaseList": [
{
"databaseName": "9zdbtest2",
"targetDatabase": "9zdbtest3",
"all": true,
"tableList": [
{
"tableName": "sbtest1",
"targetTable": "sbtest1"
},
{
"tableName": "sbtest2",
"targetTable": "sbtest2"
}
]
}
]
},
"createTime": "2026-05-08 08:35:38Z",
"name": "compare-docx-proof-20260508163538",
"isDeleted": false,
"errMsg": "",
"sourceDsName": "sqldev-13375",
"targetDsName": "13376",
"compareOption": {
"parallel": 5,
"splitNum": "1000",
"differSize": "1000",
"floatPrecision": "3",
"doublePrecision": "4",
"stringTrimStrategy": "Trim",
"enabled": true
}
}
}