array_join function
Applies to:  Databricks SQL 
 Databricks Runtime
Concatenates the elements of array.
Syntax
array_join(array, delimiter [, nullReplacement])
Arguments
- array: Any- ARRAYtype, but its elements are interpreted as strings.
- delimiter: A- STRINGused to separate the concatenated array elements.
- nullReplacement: A- STRINGused to express a- NULLvalue in the result.
Returns
A STRING where the elements of array are separated by delimiter and null elements are substituted for nullReplacement.
If nullReplacement is omitted, null elements are filtered out.
If any argument is NULL, the result is NULL.
Examples
SQL
> SELECT array_join(array('hello', 'world'), ',');
 hello,world
> SELECT array_join(array('hello', NULL ,'world'), ',');
 hello,world
> SELECT array_join(array('hello', NULL ,'world'), ',', '*');
 hello,*,world