我已经为azure数据工厂Dev环境中的管道设置了一个存储事件触发器。blob path begins with在开发环境和其他环境(分阶段和生产)中是不同的。我想把它参数化,但似乎不可能在那里使用动态内容。有没有人知道在蔚蓝DevOps管道或以其他任何方式改变它的方法?
发布于 2022-05-06 15:14:55
由于无法在Azure数据工厂存储事件触发器中参数化blob path begins with,所以我决定直接从Azure DevOps管道使用PowerShell脚本修改adf_publish分支中的DevOps。我要在这里分享我的剧本:
param(
[String] $ADFArmPath
)
$JsonData = (Get-Content $ADFArmPath -raw | ConvertFrom-Json)
$JsonData.update | % { if($JsonData.resources.properties)
{
foreach ($ItemName in $JsonData.resources.properties ) {
if($ItemName.type -eq "BlobEventsTrigger")
{
$ItemName.typeProperties.blobPathBeginsWith = $ItemName.typeProperties.blobPathBeginsWith.replace('x','y')
}
}
}
}
$JsonData | ConvertTo-Json -Depth 100 | set-content $ADFArmPath ```发布于 2022-05-06 08:55:11
目前还不可能将存储事件触发器中的blob path begins with字段参数化。您需要创建多个触发器来实现需求。
https://stackoverflow.com/questions/72107315
复制相似问题