在数据工厂中设置变量活动会引发500错误

时间:2018-11-21 22:54:15

标签: azure-data-factory-2

这可能与此问题有关,但症状有所不同。 Set Variable activity Azure Data Factory v2

我想做的就是简单地增加一个计数器(CurrentOffset),该计数器将导致父级“直到”活动重复直到达到管道参数(NumberOfDays)中定义的值。

我可以看到要设置的变量(这与上面报告的问题不同),但是当我调试或运行时,它会抛出500错误而没有错误或消息(请参见下文)。

这是一个简化的示例。

{
"name": "RunWithDateArray",
"properties": {
        {
            "name": "Until",
            "type": "Until",
            "typeProperties": {
                "expression": {
                    "value": "@equals(pipeline().parameters.NumberOfDays,variables('CurrentOffset'))",
                    "type": "Expression"
                },
                "activities": [
                    {
                        "name": "Set Variable1",
                        "type": "SetVariable",
                        "typeProperties": {
                            "variableName": "CurrentOffset",
                            "value": {
                                "value": "@{add(int(variables('CurrentOffset')),1)}",
                                "type": "Expression"
                            }
                        }
                    }
                ],
                "timeout": "7.00:00:00"
            }
        }
    ],
    "parameters": {
        "NumberOfDays": {
            "type": "String",
            "defaultValue": "3"
        }
    },
    "variables": {
        "CurrentOffset": {
            "type": "String",
            "defaultValue": "0"
        }
    }
},
"type": "Microsoft.DataFactory/factories/pipelines"

}

这是导致的错误

{"headers":{"normalizedNames":{},
"lazyUpdate":null},
"status":500,
"statusText":"Internal Server Error",
"url":"https://management.azure.com/subscriptions/8d******-****-****-****-********1469/resourcegroups/datawarehouse/providers/Microsoft.DataFactory/factories/TVLDFACTORY02/pipelines/RunWithDateArray631f7f37-a858-4fdf-9fd8-89adf581a63e/sandbox/create?sandboxId=ada11f9e-a604-42ba-8571-f58ac84958c3&api-version=2017-09-01-preview",
"ok":false,
"name":"HttpErrorResponse",
"message":"Http failure response for https://management.azure.com/subscriptions/8d******-****-****-****-********1469/resourcegroups/datawarehouse/providers/Microsoft.DataFactory/factories/TVLDFACTORY02/pipelines/RunWithDateArray631f7f37-a858-4fdf-9fd8-89adf581a63e/sandbox/create?sandboxId=ada11f9e-a604-42ba-8571-f58ac84958c3&api-version=2017-09-01-preview: 500 Internal Server Error",
"error":"{
  \"code\":\"InternalServerError\",
  \"message\":\"InternalServerError executing request\",
  \"target\":\"pipeline/RunWithDateArray631f7f37-a858-4fdf-9fd8-89adf581a63e/runid/7c666c38-67a6-4743-a068-fff623176f23\",
  \"details\":null,
  \"error\":null}"
}

是否有变通方法可以循环访问在嵌套活动中更新该变量的变量?请注意,我可以成功循环一个数组,因为它是在外部活动中定义的。

谢谢,马克。

0 个答案:

没有答案