Commands
SPL pipe commands: syntax, parameters, and examples
Commands
Pipe commands follow |. The left side is the search clause (search is optional).
Search and time
Search clause
Syntax
Retrieve events from indexes by conditions. Values support exact match, or * / ? wildcards.
Operators
| Operator | Meaning |
|---|---|
= / == | Equals |
!= / <> | Not equals |
< / <= / > / >= | Compare |
like / not like | Contains / not contains |
AND / OR | And / or (AND binds tighter; use parentheses) |
Examples
times
Syntax
Set the time range inside the statement (overrides the UI time picker).
Examples

Field operations
fields
Syntax
Keep or drop fields.
| Sign | Meaning |
|---|---|
+ (default) | Keep only listed fields |
- | Drop listed fields |
Examples
table
Syntax
Emit table columns in declaration order. Column order matches the declaration.
Examples
rename
Syntax
Rename fields.
Examples
sort
Syntax
Order results.
| Item | Description |
|---|---|
+ | Ascending (default) |
- | Descending |
Examples
Derive and aggregate
eval
Syntax
Create or overwrite fields from expressions. Multiple expressions evaluate left to right. Comparisons support string/integer mixed types.
Examples
where
Syntax
Filter inside the pipe by a boolean expression (the search keyword is also accepted).
Examples
stats
Syntax
Aggregate statistics. Without by, returns one row; with by, one row per key. Common aggregations: count, sum, avg, min, max, values, earliest, latest, variance and stddev family.
Examples
earliest / latest (in stats)
Take earliest / latest-side aggregate values for non-time fields. Sort by time first:
Truncate and frequency
head
Syntax
Take the first N rows.
Examples
limit
Syntax
Limit returned rows; optional offset.
Examples
top
Syntax
Most frequent values for the listed fields.
Examples
rare
Syntax
Least frequent values for the listed fields.
Examples
eventcount
Syntax
Count events in the current result.
Dedup and fill
dedup
Syntax
Deduplicate by field combination. Optionally keep the first N rows per key.
Examples
fillnull
Syntax
Replace nulls with a value.
Examples
filldown
Syntax
Fill downward from the last non-null value.
fillup
Syntax
Fill upward from the next non-null value.
Lookup and merge
lookup
Syntax
Join a CSV lookup table by field and write matched columns onto the result. Left-side results can stream in batches; converge high-cardinality keys with stats / dedup first.
Examples


inputlookup
Syntax
Read lookup table contents directly. Files default to $ORI_HOME/etc/lookup/ (or the site-configured path).
Examples
outputlookup
Syntax
Write the current result to a CSV lookup table.
| Parameter | Default | Description |
|---|---|---|
append | false | true appends; otherwise overwrite |
<file.csv> | — | Must end with .csv |
Examples

join
Syntax
Merge a subsearch by shared fields.
Examples
append / appendcols
Syntax
Append another subsearch to the current result (row append or column align).
Multivalue fields
makemv
Syntax
Split a single-value field into multivalue by delimiter.
mvexpand
Syntax
Expand a multivalue field into multiple rows.
mvcombine
Syntax
Combine rows into a multivalue field.
Extract and geo
rex
Syntax
Extract fields with named capture groups, or mode=sed for substitution. Default source field is _raw. Avoid special characters such as _ in new field names.
Examples
parse
Syntax
Parse fields from an expression by pattern.
spath
Syntax
Extract a path from a JSON structured field.
| Parameter | Default | Description |
|---|---|---|
input | _raw | Input field |
output | path name | Output field |
path | — | e.g. foo.bar or with array indexes |
Examples
iplocation
Syntax
Enrich an IP field with geo data from the local ipdb.
| Parameter | Default | Description |
|---|---|---|
<ip-field> | required | e.g. src_ip |
allfields | false | true emits extended fields |
prefix | empty | Output field name prefix |
lang | CN | Geo database language |
Default output fields: city_name, region_name, country_name, country_code, continent_code, latitude, longitude, timezone.
Configuration
| Item | Value |
|---|---|
| Database file | mydata4vipday3_cn.ipdb |
| Default directory | /opt/oriData/var/geo/ipdb |
| Overrides | spl.geo.home, or env VAR_DIR / ORI_HOME |
Queries fail if the database is missing. The service exposes local authenticated HTTP (no public network): POST /spl/geo/ip/batch, GET /spl/geo/health, POST /spl/geo/reload.
Examples