ARRAY_FLATTEN

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Flattens an ARRAY of ARRAYs into a single ARRAY. The function effectively concatenates the ARRAYs that are elements of the input ARRAY and returns them as a single ARRAY.

Syntax

ARRAY_FLATTEN( <array> )

Parameters

NameRequiredDescription
arrayrequiredThe ARRAY of ARRAYs to flatten. If any element of array is not an ARRAY, the function reports an error.

Returns

This function returns an ARRAY that is constructed by concatenating the ARRAYs in array. If array is NULL or contains any elements that are NULL, the function returns NULL.

Usage notes