Query Schema Comparison Correction SQL
Query correction SQL for a single inconsistent object in a schema comparison task.
Request URL: /openapi/v1/compareschema/result/correctionSql
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.progressIdcan be obtained fromdata.compareResults[].progressIdreturned by Query Schema Comparison Object Results.
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 |
| progressId | Integer | Yes | Result identifier for a single object. | 388425 |
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. | Kr1p2NXI-djkepBRnfjjt3XUdeky7BMG |
| data | Object | Correction SQL result. See the fields below. | See the example below |
| message | String | Error message returned when the request fails. | progressId does not belong to execId |
data Fields
| Parameter | Type | Description | Example |
|---|---|---|---|
| correctSql | String | Correction SQL generated for the object. | CREATE TABLE ...; |
Request Example
{
"taskId": "cc-th6j3fs58y",
"execId": 46958,
"progressId": 388425
}
Successful Invocation Example
{
"success": true,
"requestId": "Kr1p2NXI-djkepBRnfjjt3XUdeky7BMG",
"data": {
"correctSql": "CREATE TABLE `sbtest1` (...);"
}
}