reading .json data

arkiboys 9,666 Reputation points
2022-03-19T17:11:29.793+00:00

Hello,
This question is regarding flattening .json files which have inconsistent arrays as follows.
For example, I have put a simplified example of one of the .json files I receive.
Looking at the quantities field, you see the file at first does not have quantities array and then further down it has quantities array...
This therefore prevents dataflow datasource and flatten activity to read the quantities field values. and so in data preview you only get to see blank "planned" and "uom" because as you may know the dataset only gets the schema of the first appearance of the fields...
In this example file, locations is fine because throughout the file, it has arrays and it is consistent across the data.
The issue is the quantities field.

Question
How is it possible to get the values of quantities whether there is an array or not, i.e. in this case below.
Thank you

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