Event and Field Selection Query Functions
LogScale's selection functions select, rename, or remove fields. They can also select, sort, or drop events, for example to keep the first, last, or top events, or a random sample.
Table: Event and Field Selection Query Functions
| Function | Default Argument | Availability | Description |
|---|---|---|---|
array:drop(array) | array | Â | Takes the name of a flat array and drops all fields of this array. |
array:rename(array, asArray) | array | Â | Takes the name of an array and renames all fields of this array. |
drop(fields, [mode]) | fields | Â | Removes specified fields from each event. |
dropEvent() | Â | Â | Drops completely an event in parser pipeline to stop it from being ingested. |
head([limit]) | limit | Â | Returns the oldest events from an event stream. |
rename([as], field) | field | Â | Renames one or more given fields. |
sample([field], [percentage]) | percentage | Â | Samples the event stream. |
select(fields) | fields | Â | Used to specify a set of fields to select from each event. |
selectFromMax(field, include) | field | Â | Selects event with the largest value for the specified field. |
selectFromMin(field, include) | field | Â | Selects event with the smallest value for the specified field. |
selectLast(fields) | fields | Â | Specify fields to select from events, keeping value of most recent event for each field. |
sort([field], [limit], [order], [reverse], [type]) | field | Â | Sorts events by their fields. |
tail([limit]) | limit | Â | Returns the newest events from an event stream. |