跳到主要内容

查询数据对比预检查状态

查询指定数据对比任务的预检查执行状态和检查项结果。

请求地址:/openapi/v1/comparedata/precheck/status

请求方法:GET

调用前准备

请求参数

参数类型是否必填说明示例
taskIdString需要查询预检查状态的数据对比任务 ID。cd-tg3isu1xgs
precheckTaskIdString需要查询的预检查任务 ID。pcte-dj02vti9tabd

返回参数

参数类型说明示例
successBoolean请求是否成功。true
requestIdString请求 ID,可用于问题排查和链路追踪。Lu8t2KPM-eqqraVGnllse6BZdmnh5DQM
dataObject预检查状态对象。见下方字段说明

data 字段说明

参数类型说明示例
taskIdString数据对比任务 ID。cd-tg3isu1xgs
precheckTaskIdString预检查任务 ID。pcte-dj02vti9tabd
statusString预检查任务状态。取值包括:UnstartedRunningFailedSuccessSuccess
precheckItemsArray预检查项列表,包含每个检查项的执行状态、失败原因和修复建议。见下方字段说明

precheckItems 字段说明

参数类型说明示例
precheckItemString检查项标识。targetDataExistCheck
statusString检查项状态。取值包括:UnstartedRunningFailedSuccessSuccess
errorMessageString检查项失败时返回的原因和修复建议。目标存在如下表,没有包含字段:_sign 及 _version,请为这些表添加字段后重新预检查
itemNameString检查项名称。Source database privilege check
itemDescriptionString检查项描述。Check whether the account privileges of the source database meet the requirements

请求示例

{
"taskId": "cd-tg3isu1xgs",
"precheckTaskId": "pcte-dj02vti9tabd"
}

调用成功示例

{
"success": true,
"requestId": "Lu8t2KPM-eqqraVGnllse6BZdmnh5DQM",
"data": {
"taskId": "cd-tg3isu1xgs",
"precheckTaskId": "pcte-dj02vti9tabd",
"status": "Success",
"precheckItems": [
{
"precheckItem": "compareSrcPermissionCheck",
"itemName": "Source database privilege check",
"itemDescription": "Check whether the account privileges of the source database meet the requirements",
"status": "Success"
},
{
"precheckItem": "targetDataSourceCheck",
"itemName": "Target Connection Check",
"itemDescription": "Check the status of the gateway of the target datasource, database connectable, and verify the username and password",
"status": "Success"
}
]
}
}