全部產品
Search
文件中心

Data Transmission Service:查詢校正任務不一致資訊

更新時間:Feb 11, 2025

調用DescribeDataCheckTableDiffDetails介面查詢校正任務不一致資訊。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

請求參數

名稱 類型 是否必選 樣本值 描述
Action String DescribeDataCheckTableDiffDetails

系統規定參數。取值:DescribeDataCheckTableDiffDetails

CheckType Integer 2

資料校正方式,取值:

  • 1:全量校正。
  • 2:增量校正。
DbName String db_dtstest

存在不一致資料的表所在的資料庫的名稱。

TbName String test_person

存在不一致資料的表名。

PageSize Long 10

每頁記錄數。

PageNumber Long 1

頁碼,取值為大於0且不超過Integer資料類型的最大值,預設值為1。

DtsJobId String xd4e4xb419q****

遷移或同步任務ID,您可以調用 DescribeDtsJobs介面查詢。

返回資料

名稱 類型 樣本值 描述
RequestId String 621BB4F8-3016-4FAA-8D5A-5D3163CC****

請求ID。

HttpStatusCode Integer 200

狀態代碼。

ErrCode String InvalidParameter

調用出錯時返回的錯誤碼。

Success Boolean true

請求是否成功。

ErrMessage String The value of the parameter tbName is invalid.

調用錯誤時返回的錯誤資訊。

DynamicMessage String Type

動態錯誤資訊,用於替換返回參數ErrMessage錯誤資訊中的%s

說明 如果ErrMessage返回The Value of Input Parameter %s is not valid,且DynamicMessage返回Type,則代表所傳入的請求參數Type不合法。
TbName String test_person

源庫中存在不一致資料的表名。

DbName String db_dtstest

源庫中存在不一致資料的表所在的資料庫名稱。

DiffDetails Array of DiffDetails

不一致資訊。

Id Long 13058****

用於標識一條校正結果資料的自增主鍵。

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

執行校正的時間。

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 } ]

具體不一致資訊,是一個JSON字串。

  • column:欄位名稱。
  • source:源庫中的值。
  • dest:目標庫中的值。
  • isPrimary:欄位是否是主鍵。
DiffCount Long 1

資料不一致的行數。

InstanceId String dtsog8q1z3tc9t****"

執行個體ID。

樣本

請求樣本

http(s)://dts.aliyuncs.com/?Action=DescribeDataCheckTableDiffDetails
&CheckType=2
&DbName=db_dtstest
&TbName=test_person
&DtsJobId=xd4e4xb419q****
&公用請求參數

正常返回樣本

XML格式

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格式

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
}

錯誤碼

HttpCode 錯誤碼 錯誤資訊 描述
400 Throttling.User Request was denied due to user flow control. 由於請求頻次達到閾值,請求被拒絕,請稍後重試。
500 ServiceUnavailable The request has failed due to a temporary failure of the server. 由於服務端響應逾時或者不可用導致請求失敗,請重試,重試後仍失敗請聯絡支援人員。
403 InvalidSecurityToken.Expired Specified SecurityToken is expired. 簽名已經到期,請更新簽名

訪問錯誤中心查看更多錯誤碼。