Merges the elements of an array in left to right order into a string. Values are optionally delimited by a provided delimiter.


Array literal reference example:

derive type:single value:ARRAYMERGEELEMENTS(["A","B","C","D"],"-")

Output: Generates a new column with the following String value in it: "A-B-C-D"

Column reference example:

derive type:single value:ARRAYMERGEELEMENTS([myValues) as:myValuesMergedTogether'

Output: Generates the new myValuesMergedTogether column containing all of the elements in the arrays in the myElement column joined together without a delimiter between them.

derive type:single value:ARRAYMERGEELEMENTS(array_ref,my_element, [string_delimiter])

ArgumentRequired?Data TypeDescription
array_refYarrayName of Array column, Array literal, or function returning an Array to apply to the function
string_delimiterYstringOptional String delimiter to insert between merged elements in the output String.

array_ref

Name of the array column, array literal, or function whose elements you wish to merge.

 

Required?Data TypeExample Value
YesString (column reference or function) or array literalmyArray1

string_delimiter

Optional string value to insert between elements in the merged output string.

 

Required?Data TypeExample Value
NoString"-"

Example - Podium Race Finishes