question

PrustyParthasarathiCognizant-7632 avatar image
0 Votes"
PrustyParthasarathiCognizant-7632 asked HimanshuSinha-MSFT commented

Multiple Aggregates in Mapping data flow to make a hierarchial json

Below is the json structure of the output file. The source data is coming from a flat file. How to achive this in mapping dataflow of a ADF pipeline.

I created a sub columns under data like empNumber, changeticket, OrderAssociated, function, History and again created sub columns under them respectively.
In a aggregate transformation, if i do group by id, time, count and aggregae collect(data) then data is coming as a array. But in this scenario data should
come as an object and changeticket, OrderAssociated, function, History should come as an array. Not sure can we use 2 aggegate under the same mapping data flow.

{
"id": "2eac205b",
"time": "2021-11-10T08:19:22.111Z",
"count": 1,
"data": {
"empNumber": 12345,
"changeticket": [
{
"Developer": "XYZ",
"CreateDate": "20211011T081026Z",
"ChangeNumber": 12345,
"RequiredLocation": {
"LocationTags": "XXXXX",
"description": "Testing"
}
}
],
"OrderAssociated": [
{
"ChangeNumber": 12345,
"OrderNumber": null,
"Unit": "XXX XXX",
}
],
"function": [],
"History": [
{
"change": "SAVED AS DRAFT",
"comments": "Draft",
"userName": "PSP",
"status": "NEW",
}
],
}
}

azure-data-factory
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @PrustyParthasarathiCognizant-7632 ,
Thanks for the ask and using Microsoft Q&A platform .

You have shared the output file . Can you please share the input files with some dummy data ?

Thanks
Himanshu

0 Votes 0 ·

0 Answers