Summarize data
summarize produces a table that aggregates the content of the dataset. Use the aggregation functions with thesummarize
operator to produce different fields.
The following query counts events by time bins.
Tabular operators
where
where filters the content of the dataset that meets a condition when executed. The following query filters the data bymethod
and content_type
:
count
count returns the number of events from the input dataset.project
project selects a subset of fields.take
take returns up to the specified number of rows.limit
Thelimit
operator is an alias to the take
operator.
Scalar functions
parse_json
parse_json extracts the JSON elements from an array.replace_string
replace_string replaces all string matches with another string.split
split splits a given string according to a given delimiter and returns a string array.strcat_delim
strcat_delim concatenates a string array into a string with a given delimiter.indexof
indexof reports the zero-based index of the first occurrence of a specified string within the input string.Regex examples
Remove leading charactersArray functions
array_concat
array_concat concatenates a number of dynamic arrays to a single array.array_sum
array_sum calculates the sum of elements in a dynamic array.Conversion functions
todatetime
todatetime converts input to datetime scalar.dynamic_to_json
dynamic_to_json converts a scalar value of type dynamic to a canonical string representation.Scalar operators
APL supports a wide range of scalar operators:contains
The query below uses thecontains
operator to find the strings that contain the string -bot
and [bot]
:
Hash functions
- hash_md5 returns an MD5 hash value for the input value.
- hash_sha256 returns a sha256 hash value for the input value.
- hash_sha1 returns a sha1 hash value for the input value.
Rounding functions
- floor() calculates the largest integer less than, or equal to, the specified numeric expression.
- ceiling() calculates the smallest integer greater than, or equal to, the specified numeric expression.
- bin() rounds values down to an integer multiple of a given bin size.