

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# ARRAY\$1FLATTEN function
<a name="array_flatten"></a>

Merges multiple arrays into a single array of SUPER type. Elements from the first inner array appear first, followed by elements from subsequent inner arrays. NULLs are treated as known objects.

## Syntax
<a name="array_flatten-syntax"></a>

```
ARRAY_FLATTEN( array )
```

## Arguments
<a name="array_flatten-arguments"></a>

 *array*   
A SUPER expression of array form.

## Return type
<a name="array_flatten-returm-type"></a>

The ARRAY\$1FLATTEN function returns a SUPER type.

## Example
<a name="array_flatten-example"></a>

The following example shows the ARRAY\$1FLATTEN function.

```
SELECT ARRAY_FLATTEN(ARRAY(ARRAY(1,2,3,4),ARRAY(5,6,7,8),ARRAY(9,10)));
     array_flatten
------------------------
 [1,2,3,4,5,6,7,8,9,10]
(1 row)
```

## See also
<a name="array_flatten-see-also"></a>
+ [ARRAY\$1CONCAT function](r_array_concat.md)
+ [SUBARRAY function](r_subarray.md)
+ [ARRAY\$1DISTINCT function](array_distinct.md)