Multiple Collection Reference to copy API JSON data to SQL

Kunal Kumar Sinha 171 Reputation points
2020-11-06T13:02:21.223+00:00

Hi, I'm trying to fetch data from API whose response is nested json, I used collection reference to capture all the results but the results have arrays in which by default only first value is captured. I checked the documentation also (https://learn.microsoft.com/en-us/azure/data-factory/copy-activity-schema-and-type-mapping ) and there it has mentioned only single array is supported for such operation.
Please let me know how i can capture all the nested array json values.
I tried using the Map complex values to string option also but it's not working.

PFA for the json result and ADF mapping done.

38026-adfcapture.png38027-jsoncapture.png

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

1 answer

Sort by: Most helpful
  1. HarithaMaddi-MSFT 10,136 Reputation points
    2020-11-10T11:50:48.143+00:00

    Thanks @Kunal Kumar Sinha for sharing the file. Below is an approach I have used to get the data for triggers and firms arrays in the given file. Attached the dataflow JSON to the issue.

    38793-multiplearraysjsonadf.gif
    38818-dataflowjson.txt

    However, when you mentioned static, please suggest if it means that triggers/firms may not occur under results node always as in sample file. As per my understanding, if root(Results in this case) needs to be identified dynamically, we need to alter the ARM templates and use deployment approach to achieve it.

    Please suggest for more queries and we will be glad to assist further.

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

    • Please accept an answer if correct. 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.
    1 person found this answer 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.