Extract Data on fly from dynamic API call using ADF

Abhijit Bhadra 91 Reputation points
2022-06-09T14:00:08.583+00:00

I have some numbers stored as JSON file into a blob storage container, need to read those numbers one by one and then dynamically call APIGW iterating with those numbers.
I have designed a pipeline with "LOOKUP" activity to read those numbers and after "LOOKUP" activity planted "FOR EACH" activity for iteration.
Now i need to extract some values from the API response on fly(don't want to store all values from API and then extract the values) and store as single CSV file.
APIGW response in XML format.

Is there any possibility to do that using ADF?

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

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2022-06-13T10:08:07.603+00:00

    Hi @Abhijit Bhadra ,

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

    Yes your approach is right. Use Lookup activity to get dynamical numbers and use ForEach activity to iterate over them. Inside Foreach activity use Copy activity. In Copy activity for source tab use REST or HTTP connector type dataset and in Sink tab use dataset of your destination data store. Please note, Here your source dataset should be parameterized so that dynamically it can take numbers from ForEach iterator and form the API URL dynamically and get response accordingly.

    When you say you want to extract required data that means loading data from desired tags itself? If yes, utilize mappings tab under copy activity and import schemas there and remove the mappings of not required tags.

    Please check below video where almost similar kind of requirement of forming API URL dynamically inside ForEach loop explained.
    https://www.youtube.com/watch?v=EbURwy2a8dM

    Below video helps to understand about parameterizing datasets.
    https://www.youtube.com/watch?v=9XSJih4k-l8

    Hope this helps. Please let us know if any further queries.

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


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.