我有一個復制資料活動,其中我的源資料集設定為 RestResource。它作業正常,除了每隔一段時間 Rest 呼叫回傳一個空資料集:{"d":{"results":[]}}
這會導致以下錯誤
{
"errorCode": "2200",
"message": "ErrorCode=UserErrorTypeInSchemaTableNotSupported,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Failed to get the type from schema table. This could be caused by missing Sql Server System CLR Types.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.InvalidCastException,Message=Unable to cast object of type 'System.DBNull' to type 'System.Type'.,Source=Microsoft.DataTransfer.ClientLibrary,'",
"failureType": "UserError",
"target": "Import Punch Adjustments",
"details": []
}
我知道對于其他來源,您可能想要查找或檢查元資料,然后執行條件 if,但我不確定如何為休息來源執行此操作。還有其他更好的選擇嗎?
uj5u.com熱心網友回復:
您可以在失敗時添加活動,這樣即使復制活動失敗,管道也會成功運行。
例子:
我添加了一個活動來存盤失敗時的錯誤代碼。
@string(activity('Copy data1').Error.errorCode)


管道狀態:

轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/451736.html
