Search code examples
azureazure-data-factory

line break not working for me in ADF pipeline


I have tried to write an array variable to file by adding an additional column with @join(array, '\r\n') but it returns

filename2
AR-23-CA-23030949-01-80914248.json \r\n AR-23-CA-23031077-01-80914244.json

I would like each name on seperate row. What am I doing wrong?

enter image description here


Solution

  • If the expression is given as @join(variables('FileNames'),'\r\n') , the Json representation of the pipeline activity looks like, @join(variables('FileNames'),'\\r\\n'). You can edit the Json activity and replace \\r\\n to \r\n. By this way, you can use the line break as delimiter in Join function.

    gif1

    You can also use the below expression for line break.

    @join(variables('FileNames'), decodeUriComponent('%0D%0A'))

    %0D%0A is the URL-encoded representation of the \r\n character sequence, so using decodeUriComponent('%0D%0A') is equivalent to using \r\n directly.