How to get required output in JSOn format using ADF derived column

Viewed 111

I need an output like this

enter image description here

I have the required columns(Article Code,PromotionPrice,SalesPrice) coming from CosmosDB, rest all are hardcoded.

I have done the below changes in ADF derived column.

[@(
            articleCode=id,
            ColorOverrule=toString(null()),
            DescriptionOverrule=toString(null()),
            promotionPrice=Price_For,
            salePrice=Price_From)
]

enter image description here

But with this I am getting output like below, Which is not correct. enter image description here

1 Answers

I had tried earlier in same scenario, Use collect() function instead of manually adding [] symbols inside derived columns, using expression with [] symbols will not help to yield array. Add another Derived column and use collect function.

Related