Browse docs
On this page

ObiQL Reference

Every pipe stage ObiQL ships today - generated from the stage registry the parser itself reads, so it can never drift from what actually runs.

inputlookup

Search a lookup table's own rows instead of events. Must be the first thing in the query.

| inputlookup hostname_map

inputlookup syntax, arguments and examples

stats

Aggregate matching events - count, sum, avg, min, max, latest value, percentiles, distinct counts, distinct values.

| stats count() by service

stats syntax, functions and examples

timechart (also bucket)

Aggregate into fixed time buckets. The shape a dashboard panel binds to.

| timechart span=5m count() by service

timechart syntax, functions and examples

sort

Sort the result set. Prefix a field with - for descending.

| sort -count

sort syntax, arguments and examples

limit

Cap the number of rows returned.

| limit 20

limit syntax, arguments and examples

dedup

Keep the first row, or first N rows, for each distinct combination of fields.

| dedup service, host

dedup syntax, arguments and examples

mvexpand

Split a field holding several values into one row per value, such as the list a values() aggregation returns.

| mvexpand tags

mvexpand syntax, arguments and examples

transaction

Group related events into one row per transaction, such as each visitor's session, with its duration and event count.

| transaction visitor_id maxpause=30m

transaction syntax, arguments and examples

bin

Put each value of a field into a bucket: a timestamp into a time bucket, a number into a range such as 200-300.

| bin _time span=1h

bin syntax, arguments and examples

where

Filter the output of an aggregation, or narrow raw events further.

| where duration_ms > 500

where syntax, arguments and examples

table (also fields)

Project down to specific fields for display or export.

| fields service, level, duration_ms

table syntax, arguments and examples

rename

Rename a field in the result set. Display-only - stored events are untouched.

| rename src_ip AS client_ip

rename syntax, arguments and examples

extract

Pull new fields out of an existing field at search time - a placeholder pattern, or a regex with named groups.

| extract field=message pattern="<method> <uri> <status>"

extract syntax, arguments and examples

json

Read fields out of JSON held inside a field. Names every key it finds unless you name the paths yourself.

| json field=message

json syntax, arguments and examples

eval

Compute a new column from the ones a row already has - arithmetic, text, and conditionals.

| eval seconds = duration_ms / 1000

eval syntax, functions and examples

lookup

Enrich results from a lookup table. On its own it finds the field named after the table's key column and adds every other column.

| lookup hostname_map hostname AS host OUTPUT owner_team

lookup syntax, arguments and examples

askObi

Ask the workspace's AI model about these results. Returns one row per finding. Prebuilt prompts: insights (anything I need to know), anomalies, security; or write your own in quotes.

| askObi

askObi syntax, arguments and examples

delete

Permanently delete every event this query matches. Requires the Can Delete Events role.

service=checkout-api level=debug | delete

delete syntax, arguments and examples