How to replace all the \ which is coming inside the string which also contains a string

sachin gupta 376 Reputation points


I am calling REST api through ADF and storing the data in blob storage. There are few columns which has value like \\name\\":\\"what we do\\",\\"values\\":[\\"food\\"]"

The output should be name:what we do,values:food How to handle such column values using dataflow visual builder expression before writing into a final csv file.

Appreciate your help.


Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,101 questions
{count} vote

1 answer

Sort by: Most helpful
  1. ShaikMaheer-MSFT 38,326 Reputation points Microsoft Employee

    Hi @sachin gupta ,

    Thank you for posting query in Microsoft Q&A Platform.

    Copy activity will only help you to perform data movement. To remove, \ symbols from your data you need to consider data transformation using data flows. replace() function inside helps you to replace \ with empty.

    Lets say you have column "data" which contains your data with \ symbols then, you should use derived column transformation and apply replace function on data column as shown below.
    replace($data, '\','')

    Please Note, you consider using data flows using either of below approaches.

    • Copy data from API to blob file and then use file from blob as source in Data flow.


    • Use your REST API as source in Data flow.

    Hope this will help. Please let us know if any queries. Thank you.


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    0 comments No comments