MAP_PICK

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Returns a new MAP containing the specified key-value pairs from an existing MAP. To identify the key-value pairs to include in the new map, pass in the keys as arguments, or pass in an array containing the keys. If a specified key isn’t present in the input map, the key is ignored.

Syntax

supportedpartialnot supportednot scored

MAP_PICK( <map>, <key1> [, <key2>, ... ] )

MAP_PICK( <map>, <array> )

Parameters

NameRequiredDescription
maprequiredThe input map.
key1,key2requiredOne or more keys that identify the key-value pairs to be included in the returned map.
arrayrequiredAn array of keys that identify the key-value pairs to be included in the returned map. You can specify a semi-structured ARRAY or a structured ARRAY.

Returns

Returns a new MAP containing some of the key-value pairs from an existing MAP.