Hi Asati, Ankit (AS) ,
Welcome to Microsoft Q&A platform and thanks for posting your query here.
As per my understanding you are trying to convert multiple rows of csv file into single array and convert the records into items of the array using data factory pipelines. Please let me know if that is not the case.
As you have mentioned that you do not want to loop through the records in the pipeline which could be one of the approach to use 'Append variable activity' inside foreach activity to append each of the records into the array variable, however you want an alternative approach to achieve the requirement.
You can use dataflow transformations to achieve this requirement.
- Add 'Derived column' transformation and create a new column , say 'ID' and give a static integer value to it (Ex: 1) so that each record will have Id=1 , to help us group by using that ID.
- Now use 'Aggregate column' transformation and in group by tab , select 'ID' . In aggregate tab, select the column present in csv , say , 'data' and provide the expression as
collect(data)
- This will create an array containing all the records of the file
- Add Sink transformation to move to to the destination location.
Hope it helps. Kindly accept the answer by clicking on Accept answer
button. Thankyou