Pass and Loop a rest url from a csv

sam nick 286 Reputation points
2022-01-02T04:17:39.51+00:00

Hello,
I have the task of retrieving data via a REST API but for every single day. So basically, call the url for 1/1/2021, load whatever data i get into a SQL db and then resend it for 1/2/2021 and load /append into DB and so on until the current day. This is a one time action. Please can you help me on how to achieve this.

The URL i need to send is https://applicationame.com/api/datarecords?since=2021-01-01

For every run, i need to add the date by 1 day.

So, I thought of having a csv with all the dates and having a foreach loop to execute it but passing the child item as parameter to the url. The concept is in my head, but is there a better way to accomplish this.

Thank you.

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

Accepted answer
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-01-03T17:18:56.457+00:00

    Hi @sam nick ,

    Thank you for posting query in Microsoft Q&A Platform.

    To get date value alone from your Lookup output, you should use expression as @item().Date

    Kindly check below video as well, where little similar requirement discussed.
    https://www.youtube.com/watch?v=EbURwy2a8dM&list=PLMWaZteqtEaLacN3eS3s8pw2jtwBVb1BH&index=33

    Hope this will help. Please let us know if any further queries.

    -------------------

    Please consider hitting Accept Answer button. Accepted answers helps community as well.

    0 comments No comments

0 additional answers

Sort by: Most helpful