Hi Veera Mummidi ,
Welcome to Microsoft Q&A platform and thanks for posting your query here.
As per my understanding you are trying to remove one of the jsons from your data and load it in new json file using mapping dataflow in ADF .
First of all, the json you shared is slightly invalid due to absence of comma , I have modified it to make valid json:
{"formdata": {
"a":1,
"b": 2,
"include": {
"a1":1,
"date" : ""
},
"exclude": {
"name": "john",
"country" : "us"
}
}
}
- Point the Source dataset to your input json file and select the document form as 'Single document'
- Use Aggregate transformation . Leave the 'Group by' tab as blank and go to 'Aggregate' tab . Select 'formdata' column and provide expression as 'collect(formdata)'. This will convert the complex datatype into array
- Now use Flatten transformation and select 'Formdata[]' array to unroll by and choose 3 columns 'a','b' and 'include'
- Use Sink transformation and select json connector to load the output.
Hope it helps. Kindly accept the answer by clicking on Accept answer
button