VALUES

VALUES(value)[source]

Extracts the values from a map and returns them as an array.

The VALUES function takes a model component with a map data type and converts its values into an array.

Parameters:

value (Operand) –

A model component of type MapDataType whose values will be extracted.

Supported types:

  • INTEGER_MAP

  • DECIMAL_MAP

  • STRING_MAP

  • BOOLEAN_MAP

  • DATE_MAP

  • DATETIME_MAP

  • TIME_MAP

Return type:

Formula

Returns:

An array containing the values of the map.

Supported types:

  • INTEGER_ARRAY

  • DECIMAL_ARRAY

  • STRING_ARRAY

  • BOOLEAN_ARRAY

  • DATE_ARRAY

  • DATETIME_ARRAY

  • TIME_ARRAY

Raises:

ValueError – if the input is not of type MapDataType.

Examples

Extracting values from a map:

VALUES(my_map)
# Returns ["a", "b", "c"] for a map {0: "a", 1: "b", 2: "c"}