Problem Statement :
How at Append a string to every element :
Input :
Output :
GitHUB Code
Is it possible to achieve the same without the use of any Iteration Activities.
Note : One cannot use Iteration Activities within Iteration Activity , thereby leading for creation of a new Pipeline and leveraging Execute Activity within the iteration activity.
Prerequisites :
- Azure Data Factory / Synapse
Solution :
With iteration being ruled out, one can achieve this by converting the Array to a string, leverage REPLACE function, CONCAT function, and then SPLIT to turn it back into array again.
GitHUB Code
- JOIN the Input Array together into a String using (‘abc’ + ‘;’) as Separator
OUTPUT : 1abc;2abc;3
2. CONCAT the addition string ‘abc’ to the end of the string
OUTPUT : 1abc;2abc;3abc
3. SPLIT the string back into Array using ‘;’ as a Separator
OUTPUT : [“1abc”,”2abc”,”3abc”]
To Append the String in front of the Element as below :
Leverage the below expression (rearranging the expression used above) :