Thanks for reaching out to Microsoft Q&A.
Here are two ways to parameterize URLs in linked services within Azure Data Factory (ADF): 1. Using Global Parameters: This method is suitable when the URL parameter value needs to be reused across different pipelines or activities. Here's how to do it: a. Create a Global Parameter:
- Go to the Manage tab in ADF Studio.
- Click on Global parameters.
- Click New to create a new parameter.
- Enter a descriptive name for your parameter (e.g.,
baseUrl
). - Choose the appropriate data type (e.g., String).
- Optionally, provide a default value for the parameter.
- Click OK to save the parameter.
b. Use the Parameter in the Linked Service URL:
- Open the Linked Service you want to modify.
- Locate the property containing the URL (e.g.,
http://example.com/data
). - In the URL definition, use the ADF expression language to reference the global parameter. For example:
@concat('https://', parameters('baseUrl'), '/data')
2. Using Pipeline Parameters: This method is useful when the URL parameter value is specific to a particular pipeline run. Here are the steps: a. Create a Pipeline Parameter:
- Open the pipeline you want to edit.
- Go to the Parameters tab.
- Click New to create a new parameter.
- Enter a descriptive name for your parameter (e.g.,
baseUrl
). - Choose the appropriate data type (e.g., String).
- Optionally, provide a default value for the parameter.
- Click OK to save the parameter.
b. Use the Parameter in the Linked Service URL:
- Open the Linked Service you want to modify.
- Locate the property containing the URL.
- In the URL definition, directly reference the pipeline parameter enclosed in double quotes. For example:
"https://{{parameters('baseUrl')}}/data"
for detailed information
refer; https://learn.microsoft.com/en-us/azure/data-factory/parameterize-linked-services?tabs=data-factory
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.