Query Data Comparison Difference Details
Query inconsistent record details for a specified table. You can filter results by difference type.
Request URL: /openapi/v1/comparedata/result/diffDetails
Request Method: GET
Before You Call
taskIdandexecIdcan be confirmed from the request context of Query Data Comparison Table Summary.progressIdcan be obtained fromdata.tableSummaries[].progressIdreturned by Query Data Comparison Table Summary.
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| taskId | String | Yes | Data comparison main task ID. | cd-tg3isu1xgs |
| execId | Integer | Yes | Execution ID of a data comparison subtask. | 326816 |
| progressId | Integer | Yes | Unique identifier of a single table comparison result. | 2934527 |
| filter | Integer | No | Difference type filter. Omit this parameter to return all differences. 0 returns only records that exist on both sides but have different field values. -1 returns only records that exist on the source side but not on the target side. 1 returns only records that exist on the target side but not on the source side. | 0 |
| pageSize | Integer | No | Number of records per page. The default value is 30, and the maximum value is 100. | 30 |
| pageNumber | Integer | No | Page number. The default value starts from 1. | 1 |
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. | Hg4d2OLN-DJJKnOZnEELv6ZUdFHc8LBG |
| data | Object | Difference detail object. | See the field descriptions below |
data Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| totalCount | Long | Total number of inconsistent records in the current table that match the filter conditions. | 8 |
| pageNumber | Integer | Returned page number. | 1 |
| pageSize | Integer | Number of records per page. | 30 |
| primaryKeyColumns | Array | List of primary key or unique key column names. | ["control_id"] |
| diffRecords | Array | List of inconsistent records. | See the field descriptions below |
diffRecords Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| diffType | String | Difference type. Valid values: SOURCE_ONLY, which means the row exists only on the source side; TARGET_ONLY, which means the row exists only on the target side; and MISMATCH, which means the row exists on both sides but has different field values. | MISMATCH |
| sourceData | Object | Field values of the current record on the source side. Returned when diffType is SOURCE_ONLY or MISMATCH. | {"control_id":4745,"popup_name":"full5"} |
| targetData | Object | Field values of the current record on the target side. Returned when diffType is TARGET_ONLY or MISMATCH. | {"control_id":4745,"popup_name":"full6"} |
Request Example
{
"taskId": "cd-tg3isu1xgs",
"execId": 326816,
"progressId": 2934527,
"pageNumber": 1,
"pageSize": 30
}
Successful Invocation Example
{
"success": true,
"requestId": "Hg4d2OLN-DJJKnOZnEELv6ZUdFHc8LBG",
"data": {
"totalCount": 8,
"pageNumber": 1,
"pageSize": 30,
"primaryKeyColumns": [
"control_id"
],
"diffRecords": [
{
"diffType": "TARGET_ONLY",
"targetData": {
"control_id": 3,
"popup_name": "full3",
"app_id": "eufy_security"
}
},
{
"diffType": "MISMATCH",
"sourceData": {
"control_id": 4745,
"popup_name": "full5",
"app_id": "eufy_security"
},
"targetData": {
"control_id": 4745,
"popup_name": "full6",
"app_id": "eufy_security"
}
}
]
}
}