Unable to Debug When Using Global Parameter with hyphens in its name in Expressions

Susanto, Reza 21 Reputation points
2021-03-09T21:03:56.453+00:00

Found this issue after many many hours of troubleshooting. When using a Global Parameter in an expression and the parameter name has 'hypens' I was unable to debug the pipeline with the following error:

{"code":"BadRequest","message":null,"target":"pipeline//runid/dd8be58c-de84-458c-aace-xxxxxxxxx","details":null,"error":null}

Steps to reproduce:

  1. Create a Global Parameter with hyphens in its name e.g. 'global-parameter-name'
  2. Create a pipline, add a variable
  3. Add 'Set Variable' activity to assign the Global Parameter to that variable with an expression
  4. Debug the pipeline

Here's the sample pipeline

{
    "name": "pipeline1",
    "properties": {
        "activities": [
            {
                "name": "Set variable1",
                "type": "SetVariable",
                "dependsOn": [],
                "userProperties": [],
                "typeProperties": {
                    "variableName": "localVar",
                    "value": {
                        "value": "@pipeline().globalParameters.gbl-parameter-with-hypens",
                        "type": "Expression"
                    }
                }
            }
        ],
        "variables": {
            "localVar": {
                "type": "String"
            }
        },
        "annotations": []
    }
}

Is this a bug? or did I miss something?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,340 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,412 Reputation points Microsoft Employee
    2021-03-10T18:18:26.117+00:00

    Thanks @Nandan Hegde for sharing your insights and helping the community.

    Hi @Susanto, Reza , In addition to what @Nandan Hegde stated, as a good practice it is recommend to follow data flow transformation naming rules to name your pipeline parameters and variables. Please see this doc for more information: Azure Data Factory - naming rules

    76424-image.png

    If the above response from @Nandan Hegde was helpful, please do consider to accept answer and upvote on his post as it would be beneficial for other community members reading this thread.

    Do let us know if you have further query.

    Thank you