Share via

Merging 2 Array variables

Nandan Hegde 36,886 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.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Dillon Silzer 60,916 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.

    Was this answer helpful?


Your answer

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