Want to write a data from array variable to csv file in adf

Amar Agnihotri 891 Reputation points

I want to write a data from array variable to csv file in adf pipeline.

Here is my pipeline

As a result of until activity i have all the data stored to an array variable


Now i want to store this data to csv file using copy activity.
Can anyone help me out in this. @Suba Balaji


Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,469 questions
0 comments No comments
{count} votes

Accepted answer
  1. Suba Balaji 11,186 Reputation points

    Hi @Amar Agnihotri ,

    Point your source data set to a file in blob or data lake. The file can be any file. With one or two columns and couple of rows (this is just a dummy file)

    Then add an additional column in copy source and point to your variable Data. (You may have to convert the array variable to string using join)

    @fr (Variables ('Data'),',')

    This will convert the whole array to a string separated by comma and assign the string value to the additional column.

    Then , Under mapping tab, remove the columns from dummy source file and just keep the additional column.

    Point the sink to a file or folder.

    That's all. Please give a try and let us know.


    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Nandan Hegde 29,886 Reputation points MVP

    The below URL provides detailed steps :

    But one change would be to convert the array to string

    1 person found this answer helpful.
    0 comments No comments

  2. Sara Samy Khalil Shabana 1 Reputation point

    Thanks for the reply. Actually it has been achieved

    0 comments No comments