How to connect to the foreach activity output to flatten the nested json data

Ashish 20 Reputation points
2024-02-13T12:52:46.5866667+00:00

Hi,

I have just started to work with Azure Data factory.

Here is the breakdown of my pipeline

Lookup Activity: This activity retrieves the list of tickers, from adls gen2 directory.

Web Activity (Outside ForEach): This activity makes a web request to the Alpha Vantage API to fetch data based on the entire list of tickers obtained from the lookup activity. This might be used for some initialization or metadata retrieval.

ForEach Activity: This activity iterates over each item in the list of tickers obtained from the lookup activity.

Web Activity (Inside ForEach): This activity is placed inside the ForEach activity and makes a web request to the Alpha Vantage API for each individual ticker in the list. This fetches the specific data related to each ticker.

Now i want to flatten the nested json data and dump it to data factory before the next lookup data is picked up. Is there any way to do this? add a copy activity would require source and not sure what could be the source here since am getting output from the web activity.
Pipeline Construct

Above is the pipeline image. I have also attached the sample json output file for reference.

Thanks in advance!

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

Accepted answer
  1. QuantumCache 20,366 Reputation points Moderator
    2024-02-13T18:29:50.3033333+00:00

    Ashish Could you try the Copy Activity inside the For-each? which contains the HTTP Dataset as Source Please try this and do let us know if that works?

    Also please attach sample nested JSON from the data preview, which you want to flatten, so that we better understand the scenario!!!User's image


0 additional answers

Sort by: Most helpful

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.