Azure Datafactory无法处理Blob中的空json数组

问题描述

在azure数据工厂数据集中,使用复制活动将json blob加载到sqldb,当json blob是空数组“ []”时,复制活动会因错误而卡住。

{
    "errorCode": "2200","message": "Failure happened on 'Source' side. 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'.,'","failureType": "UserError","target": "BP_acctset_Blob2sql","details": []
}

解决方法

  1. 使用“获取元数据”获取文件大小。 enter image description here

  2. 使用if条件判断大小是否大于2。如果为true,则执行复制活动。 enter image description here