我创建了一个在其进程中使用变量的ADFV2管道。现在我想将此管道导出到JSON文件,以便将其用于未来部署。
不幸的是,当我尝试使用powershell命令“Set-AzureRmDataFactoryV2Pipeline”在另一个环境中部署管道时,它无法正常工作。
powershell命令正常运行,但是当我要去ADF接口并选择我的管道时,会出现错误并且生成的JSON不包含我的变量声明......所以管道无法运行...
你知道为什么会出现这个问题吗?
这是我的测试管道的JSON内容(这个管道什么都不做,它仅用于示例):
{
"name": "01_test",
"properties": {
"activities": [
{
"name": "Web1",
"type": "WebActivity",
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"typeProperties": {
"url": {
"value": "@variables('test')",
"type": "Expression"
},
"method": "GET"
}
}
],
"variables": {
"test": {
"type": "String",
"defaultValue": "10"
}
}
}
}
在那里,使用powershell命令部署后,在我的新环境中生成JSON:
{
"name": "01_test",
"properties": {
"activities": [
{
"name": "Web1",
"type": "WebActivity",
"policy": {
"timeout": "7.00:00:00",
"retry": 0,
"retryIntervalInSeconds": 30,
"secureOutput": false,
"secureInput": false
},
"typeProperties": {
"url": {
"value": "@variables('test')",
"type": "Expression"
},
"method": "GET"
}
}
]
},
"type": "Microsoft.DataFactory/factories/pipelines"
}
谢谢您的帮助。
我今天解决了这个问题。
这是我的AzureRM.DataFactoryV2模块版本。
在我更新模块后,一切正常。