OBJECT_PICK

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Returns a new OBJECT containing some of the key-value pairs from an existing object. To identify the key-value pairs to include in the new object, pass in the keys as arguments, or pass in an array containing the keys. If a specified key is not present in the input object, the key is ignored.

Syntax

supportedpartialnot supportednot scored

OBJECT_PICK( <object>, <key1> [, <key2>, ... ] )

OBJECT_PICK( <object>, <array> )

Parameters

NameRequiredDescription
objectrequiredThe input object.
key1, key2requiredOne or more keys identifying the key-value pairs that should be included in the returned object.
arrayrequiredArray of keys identifying the key-value pairs that should be included in the returned object.

Returns

Returns a new OBJECT containing the specified key-value pairs.

Usage notes