ARRAY_REPEAT

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Returns an ARRAY value containing a specified number of copies of an element.

Syntax

ARRAY_REPEAT( <element> , <count> )

Parameters

NameRequiredDescription
elementrequiredThe value to repeat in the output array. The value can be of any semi-structured data type — for example, VARIANT, ARRAY, OBJECT — or any standard Snowflake data type — for example, NUMBER, VARCHAR, BOOLEAN, DATE. Structured types, such as MAP, aren’t supported.
countrequiredAn INTEGER expression specifying the number of times to repeat element.

Returns

The function returns a semi-structured ARRAY value containing count copies of element. If count is NULL, the function returns NULL.

Usage notes