How to remove escape character in JSON files Azure Data Flow

170 Views Asked by At

I have a cosmos db mongo db collection as source. I am supposed to provide a json.gz file as output. I've also been given a partition count, which states the number of partitions the output file should be. I'm first staging the file with .json extension with the help of copy activity and then using this stage file as source and then load it to a .json.gz file and i've selected set partitioning round robin in sink optimize tab to partition, this happens in azure data flows as it's the only one which has partitioning.

The output file i'm getting doesn't seem to be compressing and few strings have '\' escape character in them, I do not want them.

The output is like this:

"id":"123","businesses":"[{\"titleAtBusiness\":\"MANAGER\"}]

I want it like this:

"id":"123","businesses":"[{"titleAtBusiness":"MANAGER"}]

I want the "\" gone.

Stage JSON Sink Settings: enter image description here

enter image description here

Json GZ Sink Settings: enter image description here

enter image description here

enter image description here

Data FLow: enter image description here

0

There are 0 best solutions below