gpt4 book ai didi

Azure 数据工厂复制事件将 JSON 映射到 SQL 时出错

转载 作者:行者123 更新时间:2023-12-04 02:41:23 25 4
gpt4 key购买 nike

我有一个 Azure 数据工厂复制事件,它使用 Elasticsearch 的 REST 请求作为源,并尝试将响应映射到作为接收器的 SQL 表。一切正常,除了尝试映射包含动态 JSON 的 data 字段时。我收到以下错误:

{ "errorCode": "2200", "message": "ErrorCode=UserErrorUnsupportedHierarchicalComplexValue,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The retrieved type of data JObject with value {\"name\":\"department\"} is not supported yet, please either remove the targeted column or enable skip incompatible row to skip them.,Source=Microsoft.DataTransfer.Common,'", "failureType": "UserError", "target": "CopyContents_Paged", "details": [] }

这是我的映射配置的示例:

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

data 对象中的 JSON 是动态的,因此我无法对其内的嵌套字段进行显式映射。这就是为什么我尝试将整个 JSON 对象存储在 SQL 表的列中的 data 下。

如何调整我的映射配置以使其正常工作?

最佳答案

我在 MSDN 论坛上发布了这个问题,有人告诉我,如果您使用表格接收器,则可以设置此选项 "mapComplexValuesToString": true 并且它应该允许映射复杂的 JSON 属性正确。这解决了我的 ADF 复制事件问题。

关于Azure 数据工厂复制事件将 JSON 映射到 SQL 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59185874/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com