fatbat
fatbat

Reputation: 79

Add to the same string variable inside a ForEach Acitivity in Azure Data Factory

I want a concatenated string from a Get Metadata Activity. I am passing an array of column names and data type to a ForEach Activity and I would like get a concatenated string of the column names. Is it possible with a Set Variable inside the ForEach? When I try to concatenate it is not possible to call the same variable I am concatenating to. Is there a work around?

Pipeline:

enter image description here

Output of Get Metadata1:

enter image description here

Inside ForEach:

enter image description here

Inside Set Variable:

enter image description here

I am new to Azure. Would like to know if there is a better way. Thanks!

Upvotes: 2

Views: 4012

Answers (1)

user12290435
user12290435

Reputation: 101

  1. Create an dst-text variable ex. result
  2. Create an array variable ex. mylist
  3. Inside Foreach, add an Append Variable with variable: mylist value: item()
  4. After Foreach, Set Variable: result value: join(mylist,'')

Upvotes: 4

Related Questions