Can parameters from a pipeline to be used in the REST Relative URL?

Klay Wang 1 Reputation point
2021-10-14T10:36:43.867+00:00

Hi guys, I am new to Azure Data Factory, and recently our client provides a REST API with a signature as an access token. The signature is changing every 15 minutes and combined with key and value and it needed to be hashed to MD5, which I can do as a sequel in the Azure database, in order to be accessed to the API. The hashed code will be following by the base URL.
I used the query in lookup to get the hashcode. However, I find there is no way to put this hashed code into the dataset relative URL as a dynamic thing, which means I can not combine the base URL and hashed code, so no access.
Is there a way to do that? Passing the output value from lookup activity to Relative URL in the dataset?

Azure Open Datasets
Azure Open Datasets
An Azure service that provides curated open data for machine learning workflows.
27 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,840 questions
Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
345 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,512 Reputation points Microsoft Employee
    2021-10-15T08:40:19.937+00:00

    Hi @Klay Wang ,

    Welcome to Microsoft Q&A forum and thanks for reaching out.

    In-order to pass the output of your lookup activity (hashcode value ) to RelativeURL of REST dataset, you will have to follow below steps.

    1. First declare/create a dataset parameter for your REST dataset as shown below 140841-image.png
    2. Then you will have use the dataset parameter dynamic expression ( @dataset().hashCode ) in the Relative URL property under Connection tab of your dataset 140799-image.png
    3. Now when you use this REST dataset in you Copy activity or Web activity under Dataset properties section, you will see the dataset parameter for which you will have to map the Lookup activity output value as show below @activity('LookupHashCode').output.value[0].hashCode 140852-image.png

    Hope this helps. Do let us know if you have further query.

    ----------

    • Please don't forget to click on 130616-image.png and upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.

  2. 2022-12-08T08:08:03.957+00:00

    Hi @KranthiPakala-MSFT ,
    I followed the same steps this window is popping up.
    268525-image.png
    and when I am passing the dummy value 'na', instead of appending the parameter with the base URL it appends the default value and shows the below error.
    268551-image.png. Can you please help me resolve this error?

    0 comments No comments

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.