JSON Medallion Best Practices

Kayla
Valued Contributor II

I'm looking at ingesting JSON files from an API, pulling a list of orders. Each JSON file has header information and then a nested array of items - I want to flatten this into a table with 1 row/item and the header repeated for every item.

What is the best practice for doing this with medallion architecture? Specifically, when does it make sense to explode the JSON. Normally we enforce schema on Bronze to match the source, but we've mostly been pulling from highly structured databases, and I can see arguments for having Bronze just be a table with 1 column JSON files, and others with any metadata we want to add. We'd then handle the nested schema on write to Silver.

Alternatively, we could immediately apply the exploded schema on write to Bronze.