Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt

Use this file to discover all available pages before exploring further.

Returns the length of the given array, i.e., how many elements it contains. Produces NULL for NULL arrays. Alias: LENGTH (when used with an array argument)

Syntax

ARRAY_LENGTH(<array>)

Parameters

ParameterDescriptionSupported input types
<array>The array whose length should be calculatedARRAY

Return Type

INTEGER

Example

SELECT
	ARRAY_LENGTH([ 1, 2, 3, 4 ]) AS levels;
Returns: 4
SELECT
	ARRAY_LENGTH([ [ 1, 2, 3 ], [ 4, 5, 6, 7 ]) AS levels;
Returns: 2