查看数据校验比对结果
更新时间:2023-10-12
接口说明
查看数据校验比对结果
请求结构
JSON
1POST /v{version}/task/checksum/{dtsCheckId}/result
2
3Host: dts.baidubce.com
4Authorization: authorization string
请求参数
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 | 参数位置 |
---|---|---|---|---|---|
version | String | 是 | API版本号 | "1" | Path |
dtsCheckId | String | 是 | 数据校验任务ID | "dtscxxxyyy" | Path |
响应头参数
除公共头域,无其它特殊头域。
响应体参数
响应体字段数据结构说明
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
success | boolean | 是 | 是否成功 | true |
result | Result | 是 | 结果 |
Result字段数据结构说明
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
checksumResult | ChecksumResult | 是 | 校验结果对象 |
ChecksumResult字段数据结构说明
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
status | string | 是 | 校验任务状态 | finished |
checksumResult | string | 是 | 校验结果,可能值:CONSISTENT(一致),INCONSISTENT(不一致),NONE(未知,校验任务运行未结束) | CONSISTENT |
totalTableCount | string | 是 | 总表数 | 1 |
checkedTableCount | string | 是 | 已校验总表数 | 1 |
uncheckedTableCount | string | 是 | 无法校验总表数 | 1 |
uncheckedTableList | UncheckedTableList[] | 是 | 无法校验表列表 | uncheckedTableList |
inconsistentTableCount | string | 是 | 不一致表总数 | 1 |
inconsistentCount | string | 是 | 不一致数据总数 | 1 |
inconsistentList | InconsistentList[] | 是 | 不一致数据列表 | inconsistentList |
UncheckedTableList字段数据结构说明
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
dbName | string | 是 | 源库库名 | dbName |
tableName | string | 是 | 源库表名 | tableName |
message | string | 是 | 无法校验原因 | message |
InconsistentList字段数据结构说明
参数名称 | 参数类型 | 是否必须 | 描述 | 示例值 |
---|---|---|---|---|
dbName | string | 是 | 源库库名 | dbName |
tableName | string | 是 | 源库表名 | tableName |
inconsistentType | string | 是 | 不一致数据类型,可选值:(1)INCONSISTENT:源库与目标库数据不一致(2)MISSING:源库存在, 目标库不存在(3)REDUNDANCY:源库不存在, 目标库存在 | MISSING |
srcSql | string | 是 | 定位源表数据的查询SQL | srcSql |
dstSql | string | 是 | 定位目标表数据的查询SQL | dstSql |
请求示例
JSON
1POST /v1/task/checksum/{dtsCheckId}/result
2Host: dts.baidubce.com
3Content-Type: application/json
4Authorization: bce-auth-v1/5a6f0606bf5e48f29dd132aa76aa5182/2017-06-12T13:13:05Z/1800/content-type;host;x-bce-date/8baeafe6bfc35b0cf6205e87e4ce6c0dbb442375951ace4d16e6c7a4dab95943
响应示例
JSON
1HTTP/1.1 200 OK
2
3{
4 "success": true,
5 "result": {
6 "checksumResult": {
7 "status": "finished",
8 "checksumResult": "NONE",
9 "totalTableCount": "73",
10 "checkedTableCount": "5",
11 "uncheckedTableCount": "2",
12 "uncheckedTableList": [
13 {
14 "dbName": "",
15 "tableName": "",
16 "message": ""
17 },
18 {
19 "dbName": "",
20 "tableName": "",
21 "message": ""
22 }
23 ],
24 "inconsistentTableCount": "1",
25 "inconsistentCount": "1",
26 "inconsistentList": [
27 {
28 "dbName": "",
29 "tableName": "",
30 "inconsistentType": "",
31 "srcSql": "",
32 "dstSql": ""
33 }
34 ]
35 }
36 }
37}