0

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

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, it worked! Am I able to flatten with one Flatten transformation or will I need two other source/flatten sequences for the two other sub-arrays and then join them all into a flat table?
Add another Flatten to unroll more arrays

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.