Skip to main content
Version: current [25.x]

Categories: Semi-Structured Data

MAP_KEYS

Returns all keys from a map expression.

Syntax

MAP_KEYS(input map) → array of strings

  • input: A map expression for which to return an array of keys.

Examples

MAP_KEYS example
SELECT MAP_KEYS(properties)
-- ['Cover', 'Publication Year', 'Color']
MAP_KEYS example returning literal map values
SELECT MAP_KEYS(MAP_Col) FROM (SELECT MAP['a','1', 'b', '2'] as MAP_Col)
-- ['a', 'b']