Merging 2 Array variables

Nandan Hegde 36,146 Reputation points MVP Volunteer Moderator
2023-01-28T07:35:35.7433333+00:00

Hello All.

I might be missing some simple aspect here but wanted to confirm :

Is there any way in ADF to merge 2 Array variables without the use of any iteration activity.

Like ask is as below:

Input1= [1,2,3]

Input2=[1,4,5]

Output=[1,2,3,1,4,5]

Note: the union function would only take the unique records but here the need is to have all values (which includes similar values)

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

1 answer

Sort by: Most helpful
  1. Dillon Silzer 57,826 Reputation points Volunteer Moderator
    2023-01-28T20:38:46.8233333+00:00

    Hey Nandan,

    You could convert the array(s) to string using the join() function, then concat() the strings, then convert the finalString back to an array using map().

    Join

    https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions#join

    Concat

    https://learn.microsoft.com/en-us/azure/data-factory/control-flow-expression-language-functions#concat

    Map

    https://learn.microsoft.com/en-us/azure/data-factory/data-flow-expressions-usage#map


    If this is helpful please accept answer.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.