Hello @Priya Jha ,
Thanks for the question and using MS Q&A platform.
I was working on a similar requirement where my source was like below(similar to yours):
[
{
"name": "jsonData",
"value": "[[1,22,\"AAAA\"],[888,999,\"AXAXAXAX\"]]"
}
]
Which I would like to transform to below output format in CSV/txt:
Below are the transformations I have followed to achieve it.
First use a derived column transformation to unfold the nested arrays using the below expression.
unfold(split(dropRight(dropLeft(value, 2),2),'],['))
The data preview of dataflow will look like below:
Then use a parse transformation to parse the coma separated string values and split them to individual column as shown below:
The data preview would look like below. (Note: Looks like there is a visual/UI bug in while previwing the data for parse transofrmation, I'll work with product team to fix this issue, but this is not a blocker as it is visual issue)
Then lastly have a select transformation and select the columns that you would like to copy to your sink. In my example, I will have to select columns a , b, c .
Lastly have a sink transformation and write to your desired sink.
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how