MAPVALUES

Returns a string representation of the top-level values from a VMap. This transform function requires an over() clause.

Syntax

MAPVALUES(VMap_data)

Arguments

VMap_data

The VMap from which values should be returned. The VMap can exist as:

  • The __raw__ column of a flex table
  • Data returned from a map function such as maplookup()
  • Other database content

Examples

The following example shows how to query a darkmountain flex table, using an over() clause (in this case, the over(PARTITION BEST) clause) with mapvalues().

=> SELECT * FROM (SELECT MAPVALUES(darkmountain.__raw__) OVER(PARTITION BEST) FROM darkmountain) AS a;
    values
---------------
 29029
 34.1
 Everest
 mountain
 29029
 15.4
 Mt St Helens
 volcano
 17000
 12.2
 Denali
 mountain
 14000
 22.8
 Kilimanjaro
 mountain
 50.6
 Mt Washington
 mountain
(19 rows)