多个子节点的jsonNodeReference和jsonPathDefinition

时间:2019-02-10 13:17:50

标签: azure azure-data-factory

我想知道如何在azure数据工厂中为多个子节点应用jsonNodeReference和jsonPathDefinition

示例json数据:

{
 "success": true,
"profiles": [
    {
        "id": "123",
        "data": [
            {
             "date": "2018-11-08T00:00:00",
             "name": "sree",
             "Quantity": "10"
            },
            {
                "date": "2018-11-09T00:00:00",
                "name": "sree",
                "Quantity": "20"
            }
               ]
      },
      {
        "id": "154",
        "data": [
            {
             "date": "2018-11-08T00:00:00",
             "name": "Dhanu",
             "Quantity": "25"
            },
            {
             "date": "2018-11-09T00:00:00",
             "name": "Dhanu",
             "Quantity": "29"
            }
              ]
        }
   ]

}

我尝试使用“ jsonNodeReference”:“ $。['profiles']”和 输入数据集中的“ jsonNodeReference”:“ $。['profiles'] ['data']”

预期结果是

Success Id  Date                name    Quantity
TRUE    123 2018-11-08T00:00:00 Sree    10
TRUE    123 2018-11-09T00:00:00 Sree    20
TRUE    154 2018-11-08T00:00:00 Dhanu   25
TRUE    154 2018-11-09T00:00:00 Dhanu   29

1 个答案:

答案 0 :(得分:0)

ADF仅支持一次扩展一个阵列。例如,您可以使用profile [0]这样的示例。 $。['profiles'] [0] ['data']

对于您的情况,我想您可以使用ADF自定义活动自行解析它。

enter image description here