Main Idea
In ADF, a JSON is a complex data type, we want to build an array that consists of a JSONs.
The idea is to create a DataFlow and add a key "Children" to the data, aggregate JSONs to build an array of JSONs using the aggregate activity.
We will use a dummy value (constant 1) and by this dummy value we will do the grouping to build the array.
we will require:
Prepare your data:
Input CSV file:
Expected Output:
{children: [
{"key1":"a1", "key2":"b1", "key3":"c1", "key4":"d1"},
{"key1":"a2", "key2":"b2", "key3":"c2", "key4":"d2"},
...
]}
services
we will need:
ADF DataFlow:
The settings for the activities in the dataflow:
Click on each key and pass the column as an input (expression) to this key (see the below snip)
Click on save and finish.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.