Important

This function is considered experimental and under active development and should not be used in production.

The function must be enabled using the feature flag ArrayFunctions. See Enabling/Disabling Features.

Determines the set union of array values over input events.

Use this to compute the values that occur in any of the events supplied to this function. The output order of the values is not defined. If no arrays are found, the output is empty.

ParameterTypeRequiredDefaultDescription
arraystringtrue The prefix of the array in Humio, for example for events with fields 'incidents[0], incidents[1], ...' this would be 'incidents'. [a]
asstringfalse The name of the output array.

[a] When you provide only one parameter, the implied parameter is array

Examples

Given two events with the fields mailto and mailto, return the addresses present in any event with this array.

For example, with the following input events:

humio
mailto[0]=foo@example.com
mailto[1]=bar@example.com
mailto[0]=bar@example.com

Use the following query function:

humio
array:union(mailto, as=unique_mails)

The output result:

humio
unique_mails[0]=bar@example.com
unique_mails[1]=foo@example.com