none
Parameter passing to the 'execute pipeline' activityin ADFv2

    Question

  • Is there a way to pass the name of the pipeline as parameter to the execute pipeline activity?

    I require this to automate the load and can't seem to be able to do it in ADFv2.

    P.S. I have not worked on v1.

    Please help.

    Friday, April 13, 2018 9:46 AM

Answers

  • Hi Anarghya V,

    Passing parameters to an ExecutePipeline activity is documented here:

    https://docs.microsoft.com/en-us/azure/data-factory/control-flow-execute-pipeline-activity

    The bottom of the first code example shows how to create the name of the parameter and what datatype it is:

    "parameters": [
        {
            "mySourceDatasetFolderPath": {
                "type": "String"
            }
        }
    ]

    In the example, the parameter is then referenced like this:

    "@pipeline().parameters.mySourceDatasetFolderPath"

    You would use this same procedure to pass a pipeline name to the ExecutePipeline activity.  Creating a pipeline name parameter, building on this same example, might look like this:

    "parameters": [
        {
            "mySourceDatasetFolderPath": {
                "type": "String"
            },
            "myPipelineName": {
                "type": "String"
            }
        }
    ]

    To pass the parameter in the block where you reference the pipeline you are executing:

    "pipeline": {
        "referenceName": "@pipeline().parameters.myPipelineName",
        "type": "PipelineReference"
        },

    If you were automating with Powershell, you might get pipeline names with the 'Get-AzureRmDataFactoryPipeline' cmdlet:

    https://docs.microsoft.com/en-us/powershell/module/azurerm.datafactories/Get-AzureRmDataFactoryPipeline?view=azurermps-5.7.0

    You might then pass name values to the 'Invoke-AzureRmDataFactoryV2Pipeline' cmdlet as parameters:

    https://docs.microsoft.com/en-us/powershell/module/azurerm.datafactoryv2/invoke-azurermdatafactoryv2pipeline?view=azurermps-5.7.0

    You can pass parameters to your activities in the UI, but they will not be dynamic as they would be in a more complex automation:

    Friday, April 13, 2018 9:53 PM
    Moderator

All replies

  • Is there a way to pass the name of the pipeline as parameter to the execute pipeline activity?

    I require this to automate the load and can't seem to be able to do it in ADFv2.

    P.S. I have not worked on v1.

    Please help.

    Hi,

    You can try using System variables (get the pipeline name and store it somewhere and use it for dynamic execution)  - https://docs.microsoft.com/en-us/azure/data-factory/control-flow-system-variables


    sathya - My blog ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

    Friday, April 13, 2018 10:40 AM
  • Hi Anarghya V,

    Passing parameters to an ExecutePipeline activity is documented here:

    https://docs.microsoft.com/en-us/azure/data-factory/control-flow-execute-pipeline-activity

    The bottom of the first code example shows how to create the name of the parameter and what datatype it is:

    "parameters": [
        {
            "mySourceDatasetFolderPath": {
                "type": "String"
            }
        }
    ]

    In the example, the parameter is then referenced like this:

    "@pipeline().parameters.mySourceDatasetFolderPath"

    You would use this same procedure to pass a pipeline name to the ExecutePipeline activity.  Creating a pipeline name parameter, building on this same example, might look like this:

    "parameters": [
        {
            "mySourceDatasetFolderPath": {
                "type": "String"
            },
            "myPipelineName": {
                "type": "String"
            }
        }
    ]

    To pass the parameter in the block where you reference the pipeline you are executing:

    "pipeline": {
        "referenceName": "@pipeline().parameters.myPipelineName",
        "type": "PipelineReference"
        },

    If you were automating with Powershell, you might get pipeline names with the 'Get-AzureRmDataFactoryPipeline' cmdlet:

    https://docs.microsoft.com/en-us/powershell/module/azurerm.datafactories/Get-AzureRmDataFactoryPipeline?view=azurermps-5.7.0

    You might then pass name values to the 'Invoke-AzureRmDataFactoryV2Pipeline' cmdlet as parameters:

    https://docs.microsoft.com/en-us/powershell/module/azurerm.datafactoryv2/invoke-azurermdatafactoryv2pipeline?view=azurermps-5.7.0

    You can pass parameters to your activities in the UI, but they will not be dynamic as they would be in a more complex automation:

    Friday, April 13, 2018 9:53 PM
    Moderator
  • Thank you for that detailed answer :) ... I had already tried following the control flow documentation page  you have mentioned but the v2 UI does not seem to allow this and this was my problem. The microsoft feedback team confirmed this and also mentioned that this would be fixed in future updates.

    Automating with powershell would be the way to go. :)


    Anarghya V

    Sunday, April 15, 2018 7:24 AM