查询内容对比详情
功能介绍
查询内容对比详情
URI
GET /v3/{project_id}/jobs/{job_id}/compare/{compare_job_id}/content-detail
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
租户在某一Region下的Project ID。 获取方法请参见获取项目ID。 |
|
job_id |
是 |
String |
任务ID。 |
|
compare_job_id |
是 |
String |
对比任务ID。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
target_db_name |
否 |
String |
目标库名称。 |
|
db_name |
否 |
String |
源库名称。 |
|
type |
否 |
String |
类型。 compare:对比 unCompare:无法对比 |
|
limit |
否 |
Integer |
每页显示的条目数量。 缺省值:1000 |
|
offset |
否 |
Integer |
偏移量,表示从此偏移量开始查询, offset大于等于0。 缺省值:0 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
Content-Type |
是 |
String |
指定类型为application/json。 缺省值:application/json |
|
X-Auth-Token |
是 |
String |
从IAM服务获取的用户Token。 |
|
X-Language |
否 |
String |
请求语言类型。 缺省值:en-us 枚举值:
|
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
total_count |
Integer |
对比数量。 |
|
content_compare_result_infos |
Array of objects |
对比信息列表。 详情请参见表5。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
source_db |
String |
源库名称。 |
|
target_db |
String |
目标库名称。 |
|
source_table_name |
String |
源库的表名称。 |
|
target_table_name |
String |
目标库的表名称。 |
|
source_row_num |
Long |
源库表行数。 |
|
target_row_num |
Long |
目标库表行数。 |
|
difference_row_num |
Long |
源库的表和目标库的表的差异值。 |
|
line_compare_result |
Boolean |
行对比结果。
|
|
content_compare_result |
Boolean |
内容对比结果。
|
|
message |
String |
附加信息。 |
|
compare_line_config_filter |
String |
行过滤配置条件 |
|
status |
Integer |
全量比对状态。 -1:对比中 -2:已完成 -3:待对比 -4:已取消 |
|
complete_shard_count |
Integer |
已对比分片数。 |
|
total_shard_count |
Integer |
总分片数。 |
|
progress |
Double |
比对进度。 |
请求示例
查询内容对比详情
https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/f8688cfa-4e05-406f-a2e6-37a773cjb20y/table/compare/48c6acb4-1473-48fd-8676-df3705758c27/content-detail?limit=10&offset=0
响应示例
状态码: 200
OK
{
"total_count" : 2,
"content_compare_result_infos" : [ {
"source_db" : "db2",
"source_table_name" : "tb2",
"source_row_num" : 2434882,
"target_db" : "db2",
"target_table_name" : "tb2",
"target_row_num" : 2434882,
"difference_row_num" : 0,
"line_compare_result" : true,
"content_compare_result" : true,
"status" : 2,
"complete_shard_count" : 21,
"total_shard_count" : 21,
"progress" : 100
}, {
"source_db" : "db1",
"source_table_name" : "tb1",
"source_row_num" : 1,
"target_db" : "db1",
"target_table_name" : "tb1",
"target_row_num" : 1,
"difference_row_num" : 0,
"line_compare_result" : true,
"content_compare_result" : true,
"status" : 2,
"complete_shard_count" : 21,
"total_shard_count" : 21,
"progress" : 100
} ]
}
状态码: 400
Bad Request
{
"error_code" : "DRS.M00202",
"error_msg" : "The value of jobId is invalid."
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
错误码
请参见错误码。