flatten dataflow

arkiboys 9,646 Reputation points

For the below json, I have a flatten activity
unroll by --> [] parcels
unroll root --> [] parcels

In preview I can see
1- parcel columns --> name and state populated.
I added in Flatten settings, the column: parcels.locations but that only shows

Question, how do I see the values for the location in preview?


parcels {} complex
quantities [] complex
locations []

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

Accepted answer
  1. AnnuKumari-MSFT 31,716 Reputation points Microsoft Employee

    @arkiboys ,

    We need to use another flatten transformation in order to flatten the nested array. However , in your case, all the nested array inside parcel[] are of same level , not hierarchical. You can split the first flatten activity using transformation called 'New branch' which will create a copy of first flatten transformation and then use subsequent flatten transformations for quantity[],location[] , etc. Post that, you can use join or union transformation for further requirement .



    If the above suggestion was helpful, kindly do click Accept Answer and Up-Vote for the same. In case you have any further query please do let us know.

1 additional answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 31,716 Reputation points Microsoft Employee

    Hi @arkiboys ,
    Thankyou for using Microsoft Q&A platform and posting your query.
    As per my understanding, you are trying to flatten the nested JSON data using dataflow and you want to preview the items of the array in data preview tab. Please let me know if my understanding is incorrect.

    I tried to repro your scenario with the shared json content with same settings:
    unroll by --> [] parcels
    unroll root --> [] parcels

    In order to view the items of the array you need to click on the dropdown button present at the left. Please see the below image for reference. Use another flatten activity to flatten the nested array . Eg. quantities[], locations[] , etc.



    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