How do i refrence my dataset parameter in my base url in azure copy rest activity

Osamwonyi Alekwe 40 Reputation points
2024-07-13T10:37:57.42+00:00

Good day, Is there a way i can reference my dataset parameter in my rest copy activity on the base url,

am trying to create a dynamic url:

User's image

User's image

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

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 22,541 Reputation points
    2024-07-13T12:19:39.1633333+00:00

    Based on this old thread :

    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:

    1. Go to the Manage tab in ADF Studio.
    2. Click on Global parameters.
    3. Click New to create a new parameter.
    4. Enter a descriptive name for your parameter (e.g., baseUrl).
    5. Choose the appropriate data type (e.g., String).
    6. Optionally, provide a default value for the parameter.
    7. Click OK to save the parameter. b. Use the Parameter in the Linked Service URL:
    8. Open the Linked Service you want to modify.
    9. Locate the property containing the URL (e.g., http://example.com/data).
    10. 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:

    1. Open the pipeline you want to edit.
    2. Go to the Parameters tab.
    3. Click New to create a new parameter.
    4. Enter a descriptive name for your parameter (e.g., baseUrl).
    5. Choose the appropriate data type (e.g., String).
    6. Optionally, provide a default value for the parameter.
    7. Click OK to save the parameter. b. Use the Parameter in the Linked Service URL:
    8. Open the Linked Service you want to modify.
    9. Locate the property containing the URL.
    10. In the URL definition, directly reference the pipeline parameter enclosed in double quotes. For example:
    `"https://{{parameters('baseUrl')}}/data"``
    `
    

    for detailed information refer; https://video2.skills-academy.com/en-us/azure/data-factory/parameterize-linked-services?tabs=data-factoryHere 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:

    1. Go to the Manage tab in ADF Studio.
    2. Click on Global parameters.
    3. Click New to create a new parameter.
    4. Enter a descriptive name for your parameter (e.g., baseUrl).
    5. Choose the appropriate data type (e.g., String).
    6. Optionally, provide a default value for the parameter.
    7. Click OK to save the parameter. b. Use the Parameter in the Linked Service URL:
    8. Open the Linked Service you want to modify.
    9. Locate the property containing the URL (e.g., http://example.com/data).
    10. 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:

    1. Open the pipeline you want to edit.
    2. Go to the Parameters tab.
    3. Click New to create a new parameter.
    4. Enter a descriptive name for your parameter (e.g., baseUrl).
    5. Choose the appropriate data type (e.g., String).
    6. Optionally, provide a default value for the parameter.
    7. Click OK to save the parameter. b. Use the Parameter in the Linked Service URL:
    8. Open the Linked Service you want to modify.
    9. Locate the property containing the URL.
    10. In the URL definition, directly reference the pipeline parameter enclosed in double quotes. For example:
    `"https://{{parameters('baseUrl')}}/data"``
    `
    

    for detailed information refer; https://video2.skills-academy.com/en-us/azure/data-factory/parameterize-linked-services?tabs=data-factory


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.