array

The array function returns all values in the form of a list.

The maximum number of elements returned depends on where the query runs:

  • Search: truncates the list to a maximum of 1,000 random elements.
  • Dashboards and Rules: truncates the list to a maximum of 25 random elements.
Syntax Param data types Return type
array(expression) STRING LIST

Code Sample

  • Return an array containing event types.

    $event_type = metadata.event_type
    outcome:
      $event_type_array = array($event_type)