OBJECT_KEYS

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Returns an array containing the list of keys in the top-most level of the input object.

Syntax

OBJECT_KEYS( <object> )

Parameters

NameRequiredDescription
objectrequiredThe value for which you want the keys. The input value must be one of the following: An OBJECT. A VARIANT that contains a value of type OBJECT.

Returns

The function returns an ARRAY containing the keys. If object is a structured OBJECT, the function returns an ARRAY(VARCHAR).

Usage notes