我有一个 Azure 数据工厂复制活动,它使用 REST 请求将弹性搜索作为源,并尝试将响应映射到 SQL 表作为接收器。一切正常,除非它尝试映射data包含动态 JSON的字段。我收到以下错误:
{ "errorCode": "2200", "message": "ErrorCode=UserErrorUnsupportedHierarchicalComplexValue,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=检索到的数据类型 JObject,值为 {\"name\":\"尚不支持部门\"},请删除目标列或启用跳过不兼容的行以跳过它们。,Source=Microsoft.DataTransfer.Common,'", "failureType": "UserError", "target": "CopyContents_Paged “, “细节”: [] }
这是我的映射配置示例:
"type": "TabularTranslator",
"mappings": [
{
"source": {
"path": "['_source']['id']"
},
"sink": {
"name": "ContentItemId",
"type": "String"
}
},
{
"source": {
"path": "['_source']['status']"
},
"sink": {
"name": "Status",
"type": "Int32"
}
},
{
"source": {
"path": "['_source']['data']"
},
"sink": {
"name": "Data",
"type": "String"
}
}
],
"collectionReference": "$['hits']['hits']"
}
Run Code Online (Sandbox Code Playgroud)
data对象中的 JSON是动态的,因此我无法对其中的嵌套字段进行显式映射。这就是为什么我试图将整个 JSON …