How to use a global parameter in a linked service from a dataset in a pipeline

Brown, Jason 5 Reputation points

I am trying to set up a clean CI/CD pipeline for my Azure Data Factory. As such I am parameterizing all my linked services. For example, I have a 'url' parameter on my Azure Key Vault linked service. I have a Global Parameter which contains the value. And when I use the Key Vault to use a stored password in a web activity, I can use an expression referencing the 'url' parameter, thereby passing it to the Key Vault linked service. It seems to work fine.

Where I have trouble is when I want to use a parameter in a linked service that is used by a dataset inside a pipeline. When I use the expression builder to try to find the Global Parameter, I can't find any parameters at all, presumably because the parameter of the linked service is pipeline-scoped, and the linked service is used by the data set itself, not the pipeline, hence a lack of proper scope.
So how can this be done?

I am clicking on the expression builder link... then as you can see, the 'Global' parameter is out of scope/not present.

IUser's image

User's image

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

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 26,801 Reputation points Microsoft Employee

    Hi Brown, Jason ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your question here.

    As per my understanding, you are trying to parameterize your linked service which is using keyvault for storing the password. The parameter has its value stored in global parameter in ADF workspace. Please let me know if that is not the correct understanding.

    You need to create a parameter in the dataset level and in URL , select the parameter which would generate this expression: `@dataset().BaseURL`

    Once you do that , you will be able to see the parameter in all the activities wherever this dataset has been utilized and you can pass the value from the global parameter.globalParam

    Hope it helps. Please let me know if you have any concerns or doubts. In case the answer helped, please accept it by clicking on Accept answer button. Thankyou