ArrayJoin
The ArrayJoin function joins elements of an array into a single text string.
This function isn't compatible with all data platform connections. To check if your connection supports it, see Supported data platforms and feature compatibility.
Syntax
ArrayJoin(array, [separator], [nullReplacement])
Function arguments:
array | An array containing elements to join into a single text string.
|
separator | [optional] A character or string to return between joined elements.
|
nullReplacement | [optional] A character or string to replace elements with
|
Notes
-
Nested JSON arrays or objects in the array arguments are converted into text strings using your data platform’s JSON-to-text method. This can impact the nested JSON structure, key-value pair order, and white space (like spaces, tabs, and line breaks).
-
If any argument is
null
, the function returnsnull
.
Examples
Example 1
ArrayJoin([JSON array], “, ”)
Returns a single text string containing each non-null element from the JSON array column separated by a comma and a space.
Example 2
ArrayJoin(Array(“red”, null, “blue”, “yellow”), “ or ”, “*”)
Returns red or * or blue or yellow
.
Example 3
ArrayJoin(Json('[[1,"a"], {"b":2}, "c", 3]'), ";")
Returns [1,"a"];{"b":2};c;3
.
Updated 5 months ago