Specify a set of fields to select from events; for each field it will keep the field value of the most recent event with that field. This can be used to collect field values across a range of events, where each event contributes one or more fields to the output event. It is usually most useful in combination with groupBy.

ParameterTypeRequiredDefaultDescription
fields[string]true The names of the fields to keep.

Examples

Given event data like {id:a, from:x}, {id:a, to:x}, — a table with {id, from, to} tuples.

humio
groupby(id, function=selectLast([from,to]))