Query Schema Comparison Object Results
Query object-level comparison results for a specified schema comparison execution, including source DDL, target DDL, and whether the objects are consistent.
Request URL: /openapi/v1/compareschema/describeSchemaCompareTask
Request Method: GET
Before You Call
taskIdcan be obtained fromdata.taskIdin the successful response of Create Schema Comparison Task.execIdcan be obtained fromdatain the successful response of Start Schema Comparison Task or fromdata.lastExecIdreturned by Query Schema Comparison Main Task Details.
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| taskId | String | Yes | Schema comparison main task ID. | cc-th6j3fs58y |
| execId | Long | Yes | Schema comparison subtask ID. | 46958 |
| pageSize | Integer | No | Number of records per page. Default value: 30. Maximum value: 100. | 30 |
| pageNumber | Integer | No | Page number. The default page 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. | Lh9l2VRM-djkefYZnfjjt7MKdekw9FOC |
| data | Object | Paginated object-level comparison results. See the fields below. | See the example below |
| message | String | Error message returned when the request fails. | exec not found |
data Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| taskId | String | Schema comparison main task ID. | cc-th6j3fs58y |
| execId | Long | Schema comparison subtask ID. | 46958 |
| pageNum | Integer | Current page number. | 1 |
| pageSize | Integer | Number of records per page. | 30 |
| total | Integer | Total number of object results. | 1 |
| compareResults | Array | Object-level comparison result list. | See the fields below |
compareResults Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| progressId | Integer | Result identifier for a single object. Use it to query correction SQL. | 388425 |
| sourceDbName | String | Source database or schema name for the object. | 9zdbtest2 |
| sourceObjectName | String | Source object name. Three-level data sources may return the value in schema.table format. | sbtest1 |
| targetDbName | String | Target database or schema name for the object. | 9zdbtest3 |
| targetObjectName | String | Target object name. Three-level data sources may return the value in schema.table format. | sbtest1 |
| status | String | Object comparison status. Valid values include notstarted, running, failed, and success. | success |
| compareResult | Boolean | Whether the object schema is consistent. true means consistent, and false means inconsistent. | false |
| createTime | String | Time when object comparison started. | 2026-06-25 08:47:50Z |
| endTime | String | Time when object comparison ended. | 2026-06-25 08:47:55Z |
| sourceDdl | String | Source object DDL. | CREATE TABLE ... |
| targetDdl | String | Target object DDL. | CREATE TABLE ... |
Request Example
{
"taskId": "cc-th6j3fs58y",
"execId": 46958,
"pageNumber": 1,
"pageSize": 30
}
Successful Invocation Example
{
"success": true,
"requestId": "Lh9l2VRM-djkefYZnfjjt7MKdekw9FOC",
"data": {
"taskId": "cc-th6j3fs58y",
"execId": 46958,
"pageNum": 1,
"pageSize": 30,
"total": 1,
"compareResults": [
{
"progressId": 388425,
"sourceDbName": "9zdbtest2",
"sourceObjectName": "sbtest1",
"targetDbName": "9zdbtest3",
"targetObjectName": "sbtest1",
"status": "success",
"compareResult": false,
"sourceDdl": "CREATE TABLE `sbtest1` (...)",
"targetDdl": ""
}
]
}
}