Queries the information about inconsistent data detected in a table in a data verification task.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeDataCheckTableDiffDetails

The operation that you want to perform. Set the value to DescribeDataCheckTableDiffDetails.

CheckType Integer Yes 2

The data verification method. Valid values:

  • 1: full data verification.
  • 2: incremental data verification.
DbName String Yes db_dtstest

The name of the database to which the table that contains inconsistent data belongs.

TbName String Yes test_person

The name of the table that contains inconsistent data.

PageSize Long No 10

The number of entries per page.

PageNumber Long No 1

The page number. Pages start from page 1. Default value: 1.

DtsJobId String Yes xd4e4xb419q****

The ID of the data migration or data synchronization task. You can call the DescribeDtsJobs operation to query the task ID.

Response parameters

Parameter Type Example Description
RequestId String 621BB4F8-3016-4FAA-8D5A-5D3163CC****

The request ID.

HttpStatusCode Integer 200

The HTTP status code.

ErrCode String InvalidParameter

The error code returned if the request failed.

Success Boolean true

Indicates whether the request was successful.

ErrMessage String The value of the parameter tbName is invalid.

The error message returned if the request failed.

DynamicMessage String Type

The dynamic part in the error message. This parameter is used to replace the %s variable in the value of ErrMessage.

Note For example, if the return value of ErrMessage is The Value of Input Parameter %s is not valid and the return value of DynamicMessage is Type, the specified value of Type is invalid.
TbName String test_person

The name of the table that contains inconsistent data in the source database.

DbName String db_dtstest

The name of the source database to which the table that contains inconsistent data belongs.

DiffDetails Array of DiffDetails

The information about the inconsistent data.

Id Long 13058****

The auto-increment primary key that is used to identify the data in a verification result.

GmtCreated String 2023-04-23T10:36:05.000+00:00

The time when data verification was performed.

Diff String [ { "column": "id", "source": "9511", "dest": "9511", "isPrimary": true }, { "column": "state", "source": "3", "dest": "2", "isPrimary": false }, { "column": "create_time", "source": "2023-04-11 14:07:17.0", "dest": "NULL", "isPrimary": false }, { "column": "update_time", "source": "2023-04-11 06:07:17.0", "dest": "2023-04-11 06:02:29.0", "isPrimary": false } ]

The details of the inconsistent data, whose value is a JSON string. The JSON string contains the following parameters:

  • column: the name of the field.
  • source: the value of the field in the source database.
  • dest: the value of the field in the destination database.
  • isPrimary: indicates whether the field is a primary key.
DiffCount Long 1

The number of data rows that contain inconsistent data.

InstanceId String dtsog8q1z3tc9t****"

The instance ID.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=DescribeDataCheckTableDiffDetails
&CheckType=2
&DbName=db_dtstest
&TbName=test_person
&DtsJobId=xd4e4xb419q****
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDataCheckTableDiffDetailsResponse>
    <DiffDetails>
        <Diff>[{"column":"s_id","source":null,"dest":"9","isPrimary":true}]</Diff>
        <Id>130581999</Id>
        <GmtCreated>2023-04-23T10:36:05.000+00:00</GmtCreated>
    </DiffDetails>
    <RequestId>EE2EB5DA-1162-5FE6-AA61-DAED5E38****</RequestId>
    <InstanceId>dtsnabt4g2r19q****</InstanceId>
    <HttpStatusCode>200</HttpStatusCode>
    <TbName>test_person</TbName>
    <DbName>db_dtstest</DbName>
    <DiffCount>1</DiffCount>
    <Success>true</Success>
</DescribeDataCheckTableDiffDetailsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "DiffDetails" : [ {
    "Diff" : "[{\"column\":\"s_id\",\"source\":null,\"dest\":\"9\",\"isPrimary\":true}]",
    "Id" : 130581999,
    "GmtCreated" : "2023-04-23T10:36:05.000+00:00"
  } ],
  "RequestId" : "EE2EB5DA-1162-5FE6-AA61-DAED5E38****",
  "InstanceId" : "dtsnabt4g2r19q****",
  "HttpStatusCode" : 200,
  "TbName" : "test_person",
  "DbName" : "db_dtstest",
  "DiffCount" : 1,
  "Success" : true
}

Error codes

HTTP status code Error code Error message Description
400 Throttling.User Request was denied due to user flow control. The number of requests exceeds the limit, and the request is rejected. Try again later.
500 ServiceUnavailable The request has failed due to a temporary failure of the server. The response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support.
403 InvalidSecurityToken.Expired Specified SecurityToken is expired. The signature expired. Use a new signature.

For a list of error codes, see Service error codes.