Skip to main content

Expression functions reference

AI summary
Describes functions available in Imply Lumi expression processors for transforming string and numeric data. Covers rounding, string manipulation, concatenation, and pattern replacement operations. Helps you build expressions to modify event data flowing through pipelines.

About AI summaries.

An expression processor in Imply Lumi transforms string and numeric values as incoming events flow through a pipeline. This reference describes the functions you can use to build your expressions.

CEIL

CEIL(n)

For a numeric literal n, rounds up to the nearest integer.

Example

Rounds up the number of hours.

Expression
CEIL(hours)
Event input
{"hours": 5.8}
Expression output
hours: 6

COALESCE

COALESCE(a, b, ...)

For two or more inputs, returns the first non-null, non-empty value.

Example

Determine when an order was last updated.

Expression
COALESCE(return_date, order_date, '1900-01-01')
Event input
{"order_date": "2026-01-28T06:19:54Z"}
Expression output
last_update: 2026-01-28T06:19:54Z

CONCAT

CONCAT(a, b, ...)

For two or more inputs, joins into a single result.

Example

Combine first and last names.

Expression
CONCAT(firstName, '_', lastName)
Event input
{"firstName": "Wilma", "lastName": "Rudolph"}
Expression output
fullName: Wilma_Rudolph

FLOOR

FLOOR(n)

For a numeric literal n, rounds down to the nearest integer.

Example

Rounds down a store's rating.

Expression
FLOOR(rating)
Event input
{"rating": 4.2}
Expression output
rating_bucket: 4

LENGTH

LENGTH(s)

For string literal s, returns the number of characters.

Example

Get the length of a zip code.

Expression
LENGTH(zip)
Event input
{"zip": 92617}
Expression output
len_zip: 5

LOWER

LOWER(s)

For string literal s, converts to lowercase.

Example

Normalize email address to lower case.

Expression
LOWER(email)
Event input
{"email": "User@Example.com"}
Expression output
email: user@example.com

LTRIM

LTRIM(s)

For string literal s, removes leading whitespace.

Example

Strip leading spaces from fixed-width form field.

Expression
LTRIM(employee_id)
Event input
{"employee_id": " E4821"}
Expression output
employee_id: E4821

REPLACE

REPLACE(s, pattern, replacement)

For string literal s, finds regex pattern and replaces it with replacement.

Example

Format a date from YYYY-MM-DD to MM/DD/YYYY.

Expression
REPLACE(raw_date, "(\d{4})-(\d{2})-(\d{2})", "$2/$3/$1")
Event input
{"raw_date": "2026-03-13"}
Expression output
formatted_date: 03/13/2026

ROUND

ROUND(n, [precision])

For numeric literal n, rounds to the nearest integer or, if specified, to precision decimal places. Numbers halfway between two integers round up; for example, 4.5 rounds to 5.

Example

Rounds a price to two decimal places.

Expression
ROUND(price, 2)
Event input
{"price": 934.49032}
Expression output
price: 934.49

RTRIM

RTRIM(s)

For string literal s, removes trailing whitespace.

Example

Strip trailing spaces from product code.

Expression
RTRIM(sku)
Event input
{"sku": "SKU001 "}
Expression output
sku: SKU001

SUBSTRING

SUBSTRING(s, start, length)

For string literal s, extracts a substring starting at zero-based index start for length characters.

Example

Extract the date part of a filename.

Expression
SUBSTRING(filename, 4,6)
Event input
{"filename": "app_260313_error.log"}
Expression output
file_date: 260313

TRIM

TRIM(s)

For string literal s, removes leading and trailing whitespace.

Example

Strip leading and trailing spaces from an extracted field.

Expression
TRIM(city)
Event input
{"city": " New Orleans "}
Expression output
city: New Orleans

UPPER

UPPER(s)

For string literal s, converts to uppercase.

Example

Normalize state abbreviation to upper case.

Expression
UPPER(state)
Event input
{"state": "Ca"}
Expression output
state: CA

Learn more

For more information, see the following topics:

Manage pipelines and processors for details on creating a pipeline. Processors reference for details on processors.