Hi ,
Thanks for reaching out to Microsoft Q&A.
Below is one possible pattern you can follow in adf to flatten a nested JSON without using data flows. The broad idea is:
- Load your raw JSON into a staging location (such as a table in Azure SQL or a file in Data Lake).
- Use a mechanism (a stored procedure in Azure SQL) to read and unnest the JSON into a final, flattened table or file.
- Copy out the flattened table/file to your final destination.
highlevel steps:
- Create a staging table in Azure SQL DB (or Synapse SQL) that can store the JSON contents.
- Use Copy Activity in ADF to copy the raw JSON as-is into the staging table.
- Create a stored procedure that:
- Reads the JSON string(s) from the staging table.
- Parses and unnests the arrays into multiple rows.
- Inserts the flattened rows into a final table (or returns them in a result set).
- Call that stored procedure from a Stored Procedure Activity in ADF.
- (Optional) Copy from the final flattened table out to Blob Storage or any other sink.
Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.