Search code examples
azurepowershellazure-data-factoryazure-automation

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


I have written below code powershell script to pass the get the value from the logic apps and pass it to Azure data factory.

#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

But do not know how does my datafactory would get this value.


Solution

  • Created a pipeline parameter with the name as same you have used in the declared in automation runbook

    clientName
    

    then use this variable in notebook activities at base parameter area

    enter image description here