heroyo
heroyo

Reputation: 15

Azure Data Factory Flatten Multi-Array JSON- Issue previewing data in dataflow source

I haven't work much with ADF but I am trying to connect to a REST API and write the data to an Azure SQL DB. I have already created a pipe that copies the JSON retrieved from the Rest API to and writes to Blob storage.

When I create a dataflow and use the Blob as the source, I get a nested table in the data preview tab. Allow schema drift is selected and the JSON settings is set to document of arrays.

All the data is in subarrays under the tickets array. Is there a way to select only the tickets array? If this is possible then I should be able to easily flatten the rest.

Top Level JSON

Sub-Array

Data Preview

Upvotes: 0

Views: 1165

Answers (1)

Mark Kromer MSFT
Mark Kromer MSFT

Reputation: 3838

You can use the Flatten transformation to unroll the tickets array. It is currently showing as drifted in your data preview, so you'll want to first make it part of your metadata. You can do that either through Import Projection on the source projection tab, or use the "Map Drifted" button on your data preview panel.

Upvotes: 1

Related Questions