MAP_ENTRIES

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Returns an ARRAY value of key-value pair objects for each entry in a MAP value.

Syntax

MAP_ENTRIES( <map> )

Parameters

NameRequiredDescription
maprequiredThe input MAP value.

Returns

Returns an ARRAY value where each element is an OBJECT with a key field and a value field corresponding to an entry in the input MAP value. If map is NULL, the function returns NULL. If map is empty, the function returns an empty ARRAY value. The order of the entries in the returned ARRAY value is undefined.

Usage notes