如何将参数从 Azure Automation Runbook 传递到 Azure Datafactory 管道

How to pass a parameter from Azure Automation Runbook to Azure Datafactory pipeline

我编写了以下代码 powershell 脚本来传递从逻辑应用程序获取的值并将其传递给 Azure 数据工厂。

#I am sharing a part of the code which is should pass the parameter to the data factory
# get the clientName value from the logic apps.
Param (
Param (
[Parameter (Mandatory = $true)]
[string]
$clientName
)

$parameters = @{
    "clientName" = $clientName
}

#
$Pipeline1 = Invoke-AzureRmDataFactoryV2Pipeline -ResourceGroupName $rg1 -DataFactoryName $adf1 -PipelineName $pn1 -Parameter $parameters

但不知道我的数据工厂如何获得这个值。

创建了一个管道参数,其名称与您在自动化运行手册中声明的名称相同

clientName

然后在基本参数区域的笔记本活动中使用此变量