将整个json对象复制到Azure数据工厂中的单个表列

时间:2018-07-30 08:41:17

标签: json azure-sql-database azure-data-factory azure-data-factory-2

我想通过Azure数据工厂将整个JSON对象复制到表中的单个列中(当前使用v2,我想所需的jsonpath将与v1中的相同)。

这是示例输入:

[
{
    "id": "123", 
    "time": "2015-04-29T07:12:20.9100000Z",
    "callingimsi": "466920403025604",
    "callingnum1": "678948008",
    "callingnum2": "567834760",
    "switch1": "China",
    "switch2": "Germany"
},
{
    "id": "456", 
    "time": "2015-04-29T07:13:21.0220000Z",
    "callingimsi": "466922202613463",
    "callingnum1": "123436380",
    "callingnum2": "789037573",
    "switch1": "US",
    "switch2": "UK"
},
{
    "id": "789", 
    "time": "2015-04-29T07:13:21.4370000Z",
    "callingimsi": "466923101048691",
    "callingnum1": "678901578",
    "callingnum2": "345626404",
    "switch1": "Germany",
    "switch2": "UK"
}]

所需的表输出应如下所示:

Id | JsonData

123|{"id": "123","time": "2015-04-29T07:12:20.9100000Z","callingimsi": "466920403025604","callingnum1": "678948008","callingnum2": "567834760","switch1": "China","switch2": "Germany"}
456|{"id": "456","time": "2015-04-29T07:13:21.0220000Z","callingimsi": "466922202613463","callingnum1": "123436380","callingnum2": "789037573","switch1": "US","switch2": "UK"}
789|{"id": "789","time": "2015-04-29T07:13:21.4370000Z","callingimsi": "466923101048691","callingnum1": "678901578","callingnum2": "345626404","switch1": "Germany","switch2": "UK"}

如何获取Id值非常清楚,但是我很难在单独的列中读取完整的Json对象(在DF中仅会提取很少的列)

感谢您的帮助。

0 个答案:

没有答案