How to flatten json file having multiple nested arrays in a single array using mapping data flows ?

Amar Agnihotri 921 Reputation points

Hi i am having json file like this

these are the json objects in a single file

User's image

Now in each object these are the fields

User's image

now one fields Issue is an array field. now if i expand the issue again it is containing multiple array ,

User's image

How can we flatten this kind of json file in adf ?

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

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,432 Reputation points Microsoft Employee

    Hi @Amar Agnihotri

    Thanks for using Microsoft Q&A forum and posting your query.

    I'm assuming that the structure remains consistent across the iterations. In such scenarios, you will have to start flattening from top to bottom level. You will have to use multiple subsequent flatten transformations as described in this thread: Unable to flatten a complex json object using mapping data flow flatten activity

    The referenced thread has similar requirement (slight difference in the hierarchy).

    User's image

    For the above structure, you will have to use 3 flatten transformations. One for each for highlighted complex array objects.

    Your sample may look like this (Note this image from a difference requirement but it applies to your requirement as well)

    User's image

    Hope this helps.

    Please don’t forget to Accept Answer and Yes for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.