PowerShell Implementation on passing values to pipeline parameters and Triggering Execution

ClarissaJacquline 200 Reputation points
2023-12-05T19:57:06.77+00:00

I' ve developed a pipeline with two parameters at the pipeline level. I’m seeking guidance on using PowerShell to assign values to these parameters and trigger the pipeline. Any suggestions on how to accomplish this with PowerShell?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,101 questions
{count} votes

Accepted answer
  1. Smaran Thoomu 12,445 Reputation points Microsoft Vendor
    2023-12-06T05:11:45.0266667+00:00

    Hi @ClarissaJacquline

    Welcome to Microsoft Q&A platform and thanks for posting your question here.

    As I understand you want to assign values to pipeline parameters and trigger the pipeline using PowerShell. If this is not please let me know.

    You can use the below script that you can then modify to your needs:

    Login-AzureRmAccount
    Select-AzureRmSubscription -Subscription "yourSubId"
    
    $dfname = "youDataFActoryName"
    $rgName = "yourResourceGroupName"
    $pipe = "pipeName"
    $parameters = @{
        "param1" = "asdasd"
        "param2" = "123456"
    }
    
    Invoke-AzureRmDataFactoryV2Pipeline -DataFactoryName $dfname -ResourceGroupName $rgName -PipelineName $pipe -Parameter $parameters
    

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


0 additional answers

Sort by: Most helpful