Output file as JSON array type

Abhijit Bhadra 91 Reputation points
2022-05-12T14:36:38.657+00:00

Suppose i have already transformed JSON file(which is transformed from sql table through dataflow) as below
{"column1" : "A1","row1" : "B1"}
{"column2" : "A2","row2" : "B2"}

Is it possible to get the file as below structure using dataflow
[
{
"column1" : "A1",
"row1" : "B1"
},
{
"column2" : "A2",
"row2" : "B2"
}
]

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. MarkKromer-MSFT 5,231 Reputation points Microsoft Employee Moderator
    2022-05-12T20:41:13.497+00:00

    In data flow, use derived column to create a new column that will hold that structure { column1, row1 }. Let's call it myStruct for now. After the derived column, add an Aggregate transformation. Don't set a group-by in the aggregate and create a new aggregate called myStructs with this expression: collect (myStruct).


0 additional answers

Sort by: Most helpful

Your answer

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