Jaa


map_entries function

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime

Returns an unordered array of all entries in map.

Syntax

map_entries(map)

Arguments

  • map: A MAP expression.

Returns

An ARRAY of STRUCTs holding key-value pairs.

Examples

> SELECT map_entries(map(1, 'a', 2, 'b'));
  [{1, a}, {2, b}]