Logo
NeoArc Studio

Expression Functions Reference

Complete reference for all expression functions available in the projection expression editor, organised by category: text, numeric, date and time, conditional, type conversion, hash, and aggregate.

The projection expression editor provides a curated set of approximately 35 functions across 7 categories. Expressions are written as plain strings using SQL-style syntax. Field references use curly braces: {fieldName}. Functions can be nested and combined with arithmetic and logical operators.

Expression Syntax

Expressions support the following constructs.

ConstructSyntaxExample
Field reference{fieldName}{customer_id}
String literal'value''active'
Numeric literal42, 3.1442
Boolean literalTRUE, FALSETRUE
Null literalNULLNULL
Function callFUNCTION(args)UPPER({lastName})
Arithmetic+, -, *, /, %{price} * {quantity}
Comparison=, !=, <, >, <=, >={status} = 'active'
LogicalAND, OR, NOT{active} = TRUE AND {age} > 18
String concatenation||{firstName} || ' ' || {lastName}
Null checksIS NULL, IS NOT NULL{email} IS NOT NULL
Set membershipIN{status} IN ('active', 'pending')
Pattern matchingLIKE{email} LIKE '%@example.com'
Type castCAST(expr AS type)CAST({age} AS string)
ConditionalCASE WHEN ... THEN ... ELSE ... ENDCASE WHEN {status} = 'active' THEN 1 ELSE 0 END
Grouping( )({price} + {tax}) * {quantity}

Text Functions

String manipulation and formatting functions. All text functions accept string or text input types unless otherwise noted.

FunctionSyntaxReturnsDescription
UPPERUPPER(value)stringConvert text to upper case.
LOWERLOWER(value)stringConvert text to lower case.
TRIMTRIM(value)stringRemove leading and trailing whitespace.
LEFTLEFT(value, length)stringExtract the specified number of characters from the start.
RIGHTRIGHT(value, length)stringExtract the specified number of characters from the end.
SUBSTRINGSUBSTRING(value, start [, length])stringExtract a portion of text. Start position is 1-based. Length is optional.
REPLACEREPLACE(value, search, replacement)stringReplace all occurrences of the search string with the replacement.
CONCATCONCAT(value1, value2, ...)stringJoin two or more values together. Accepts any input type. Variadic (minimum 2 arguments).
LENGTHLENGTH(value)integerCount the number of characters in the text.
SPLIT_PARTSPLIT_PART(value, delimiter, part)stringSplit text by a delimiter and return the specified part (1-based index).

Text Function Examples

UPPER({lastName})
-- Result: 'SMITH'

CONCAT({firstName}, ' ', {lastName})
-- Result: 'John Smith'

SUBSTRING({postCode}, 1, 4)
-- Result: 'SW1A'

REPLACE({phone}, '-', '')
-- Result: '02071234567'

SPLIT_PART({fullName}, ' ', 2)
-- Result: 'Smith' (from 'John Smith')

Numeric Functions

Arithmetic and rounding functions. All accept float, decimal, or integer input types.

FunctionSyntaxReturnsDescription
ROUNDROUND(value [, decimals])decimalRound to the specified number of decimal places. Defaults to 0 if decimals is omitted.
FLOORFLOOR(value)integerRound down to the nearest integer.
CEILINGCEILING(value)integerRound up to the nearest integer.
ABSABS(value)numericReturn the absolute (positive) value.
MODMOD(value, divisor)integerReturn the remainder after integer division.

Numeric Function Examples

ROUND({totalAmount}, 2)
-- Result: 149.99

FLOOR({rating})
-- Result: 4 (from 4.7)

CEILING({estimatedHours})
-- Result: 8 (from 7.2)

ABS({balanceChange})
-- Result: 250 (from -250)

MOD({rowNumber}, 2)
-- Result: 0 (even rows) or 1 (odd rows)

Date and Time Functions

Date extraction, arithmetic, and formatting functions. Accept date or datetime input types.

FunctionSyntaxReturnsDescription
YEARYEAR(date)integerExtract the year component from a date.
MONTHMONTH(date)integerExtract the month component (1-12) from a date.
DAYDAY(date)integerExtract the day of the month from a date.
DATE_DIFFDATE_DIFF(unit, start_date, end_date)integerCalculate the difference between two dates in the specified unit. Units: day, month, year, hour, minute.
DATE_ADDDATE_ADD(date, amount, unit)datetimeAdd an interval to a date. Units: day, month, year, hour, minute.
FORMAT_DATEFORMAT_DATE(date, format)stringFormat a date as text using a pattern string (e.g. YYYY-MM-DD, DD/MM/YYYY).
CURRENT_TIMESTAMPCURRENT_TIMESTAMPdatetimeReturn the current date and time. Takes no arguments.

Date Function Examples

YEAR({createdDate})
-- Result: 2026

DATE_DIFF('day', {startDate}, {endDate})
-- Result: 30

DATE_ADD({orderDate}, 14, 'day')
-- Result: 2026-04-15 (if orderDate is 2026-04-01)

FORMAT_DATE({publishedDate}, 'DD MMM YYYY')
-- Result: '01 Apr 2026'

CURRENT_TIMESTAMP
-- Result: 2026-04-01T14:30:00Z

Conditional Functions

Null handling and branching functions. Accept any input type.

FunctionSyntaxReturnsDescription
COALESCECOALESCE(value1, value2, ...)anyReturn the first non-null value from the argument list. Variadic (minimum 2 arguments).
NULLIFNULLIF(value, compare)anyReturn null if the two values are equal; otherwise return the first value.
IFNULLIFNULL(value, default)anyReturn the default value if the input is null; otherwise return the input value.

Conditional Function Examples

COALESCE({preferredName}, {firstName}, 'Unknown')
-- Returns preferredName if not null, else firstName, else 'Unknown'

NULLIF({status}, 'N/A')
-- Returns null if status is 'N/A', else returns the status value

IFNULL({middleName}, '')
-- Returns '' if middleName is null

Type Conversion Functions

Functions for explicit type conversion between abstract types.

FunctionSyntaxReturnsInput TypesDescription
CASTCAST(value AS target_type)anyanyConvert a value to the specified abstract type. Target type must be a valid abstract type name.
TO_STRINGTO_STRING(value)stringanyConvert any value to its text representation.
TO_INTEGERTO_INTEGER(value)integerstring, float, decimalConvert a value to an integer. Strings are parsed; floats and decimals are truncated.
TO_DECIMALTO_DECIMAL(value)decimalstring, integer, floatConvert a value to a decimal number.
TO_DATETO_DATE(value [, format])datestring, datetimeConvert a text value to a date. Optional format pattern specifies the source format.

Type Conversion Examples

CAST({age} AS string)
-- Result: '25'

TO_INTEGER({quantity_text})
-- Result: 42

TO_DATE({dateString}, 'DD/MM/YYYY')
-- Result: 2026-04-01

Hash and Encoding Functions

Hashing and encoding functions for data masking, key generation, and encoding.

FunctionSyntaxReturnsInput TypesDescription
SHA256SHA256(value)stringanyGenerate a SHA-256 hash of the input value. Returns a 64-character hexadecimal string.
MD5MD5(value)stringanyGenerate an MD5 hash of the input value. Returns a 32-character hexadecimal string.
BASE64_ENCODEBASE64_ENCODE(value)stringstringEncode a text value as Base64.
BASE64_DECODEBASE64_DECODE(value)stringstringDecode a Base64 encoded value back to text.

Hash Function Examples

SHA256(CONCAT({customerId}, {orderDate}))
-- Result: 'a3f2b8c1...' (64-char hex string)

MD5({email})
-- Result: 'd41d8cd9...' (32-char hex string)

BASE64_ENCODE({apiKey})
-- Result: 'YXBpLWtleS0xMjM0NQ=='

Aggregate Functions

Grouping and summarisation functions. These are available both as expression functions and as the aggregateFunction field on aggregate transformation types.

FunctionSyntaxReturnsInput TypesDescription
COUNTCOUNT(value)integeranyCount the number of values in the group.
SUMSUM(value)numericinteger, float, decimalSum all numeric values in the group.
AVGAVG(value)decimalinteger, float, decimalCalculate the arithmetic mean of all values.
MINMIN(value)anyanyReturn the smallest value in the group.
MAXMAX(value)anyanyReturn the largest value in the group.
COUNT_DISTINCTCOUNT_DISTINCT(value)integeranyCount the number of unique values in the group.
STRING_AGGSTRING_AGG(value, separator)stringstringConcatenate all string values in the group with the specified separator character.

Aggregate Function Examples

COUNT({orderId})
-- Result: 150

SUM({lineTotal})
-- Result: 24750.00

AVG({rating})
-- Result: 4.3

STRING_AGG({tagName}, ', ')
-- Result: 'urgent, high-priority, customer-facing'

Function Categories

The expression editor groups functions into 7 categories for browsing in the function picker.

CategoryIconFunctions
TextType iconUPPER, LOWER, TRIM, LEFT, RIGHT, SUBSTRING, REPLACE, CONCAT, LENGTH, SPLIT_PART
NumericHash iconROUND, FLOOR, CEILING, ABS, MOD
Date and TimeCalendar iconYEAR, MONTH, DAY, DATE_DIFF, DATE_ADD, FORMAT_DATE, CURRENT_TIMESTAMP
ConditionalBranch iconCOALESCE, NULLIF, IFNULL
TypeArrows iconCAST, TO_STRING, TO_INTEGER, TO_DECIMAL, TO_DATE
HashFingerprint iconSHA256, MD5, BASE64_ENCODE, BASE64_DECODE
AggregateBar chart iconCOUNT, SUM, AVG, MIN, MAX, COUNT_DISTINCT, STRING_AGG