[英]How to trigger Azure Data Factory pipeline using PowerShell (Azure Automation)?
[英]Azure Data Factory Pipeline deployment with PowerShell
我創建了一個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模塊版本。
更新模塊后,一切正常。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.