copy activity - nested json data

arkiboys 9,646 Reputation points
2022-03-09T11:19:30.367+00:00

Hi,
I am using copy activity to read nested json data.
The json returned is complicated as it has several nested hierarchies.
Question:
Is it possible in copy activity - mapping tab to basically flatten every hierarchy or do I have to use dataflow flattened activity?
I ask because in copy activity - mapping tab, it looks like I can only flatten one of the hierarchies from the drop down.
Thanks

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

Accepted answer
  1. AnnuKumari-MSFT 31,561 Reputation points Microsoft Employee
    2022-03-09T11:41:17.783+00:00

    Hi @arkiboys ,

    Thankyou for using Microsoft Q&A platform and posting your query.

    As I understand your ask here , you want to copy hierarchical Json data using Copy activity in ADF. Your assumption is correct . This is doable up to one level of hierarchy by using collection reference option in mapping tab of Copy data activity.

    When copying data from hierarchical source to tabular sink, copy activity supports the following capabilities:

    • Extract data from objects and arrays.
    • Cross apply multiple objects with the same pattern from an array, in which case to convert one JSON object into multiple records in tabular result.

    For more advanced hierarchical-to-tabular transformation, you can use Data Flow.
    Please refer to the following article for more details: Hierarchical source to tabular sink

    181418-image.png

    Thread on how to use flatten transformation in data flow in order to flatten Json with multiple arrays : https://learn.microsoft.com/en-us/answers/questions/715216/index.html

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

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

    • Please don't forget to click on 130616-image.png or 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

0 additional answers

Sort by: Most helpful