flatten
function
Applies to: Databricks SQL Databricks Runtime
Transforms an array of arrays into a single array.
Syntax
flatten(expr)
Arguments
expr
: An ARRAY of ARRAY expression.
Returns
The result matches the type of the nested arrays within expr
.
Examples
> SELECT flatten(array(array(1, 2), array(3, 4)));
[1,2,3,4]
Related functions
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for