View a markdown version of this page

GET_ARRAY_LENGTH function - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026. We will start enforcing it in phases. For more information on the details of Python end of life and migration options, see the blog post that was published on June 30, 2025.

GET_ARRAY_LENGTH function

Returns the length of a SUPER array given an object or array path.

Syntax

GET_ARRAY_LENGTH( super_expr )

Arguments

super_expr

A valid SUPER expression of array form.

Return type

The GET_ARRAY_LENGTH function returns an INT.

Example

The following example shows the GET_ARRAY_LENGTH function.

SELECT GET_ARRAY_LENGTH(ARRAY(1,2,3,4,5,6,7,8,9,10)); get_array_length ---------------------- 10 (1 row)