Data flow on ADF that takes showed json file and flattens then to showed format

Nuno Trigo 51 Reputation points
2022-11-02T09:28:45.833+00:00

Hi,

Struggling with flattening a json-stat file. I think the data flow on ADF will use several "flatten" steps to do what I need. Since I can not figure it out by my self I hope you can help med.

PLease check the following json-file:
256314-image.png
256300-image.png
256316-image.png
256275-image.png

How can I transform this json file to a table in parquet/csv that will look like this:

256260-image.png

or in pivot format like this :
256317-image.png

thanks for your help.

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

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-11-03T08:31:11.013+00:00

    Hi @Nuno Trigo ,

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

    Flatten transformation helps to flatten array items in to multiple rows. So in your case you can try to unroll on arrray type keys.

    Please check below video to understand about flatten transformation.
    Flatten Transformation in Mapping Data Flow in Azure Data Factory

    In your case, from above screenshots I see schema or structure is different it's not identical. In such cases, we may experience unexpected results. Kindly make sure schema is same across all json objects. Also try to unroll array items and see if that helps. Please feel free to share your implementation details if you struck at any place along with screenshots. So that It would be easy to understand where exactly the issue is and help better.

    Please let me know how it goes.

    1 person found this answer helpful.
    0 comments No comments