MAP_PICK
functionsupportedCore SQL functionsReturns 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
| Name | Required | Description |
|---|---|---|
map | required | The input map. |
key1,key2 | required | One or more keys that identify the key-value pairs to be included in the returned map. |
array | required | An 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.