Import JSON with inconsistent structure using ADF

Sam Bera 26 Reputation points
2022-01-14T15:38:11.063+00:00

Hi,

I am using ADF data flow to convert a source JSON file into a csv format. The issue with the source file format is that not all the tags are populated all the time. There are a few tags which are fixed, but sometimes one of the tags might be missing. For example, in the complex JSON structure,
"first_touch":{"category":
{"description":"Web Asset",
"lookup_type":"clients_touch__category",
"value":100}
}
the value field might be missing for one of the rows in the files. I some cases one row might have the whole category section missing.

I want to stll populate the data with the other fields and populate blanks/null in the columns that dont exist.

Please let me know if anyone has any suggestions. Thanks in advance!

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

1 answer

Sort by: Most helpful
  1. Sam Bera 26 Reputation points
    2022-02-04T20:47:13.22+00:00

    This issue is resolved now. Just had to manually create a json file with all tags and use that for defining schema for first time.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.