Guide to Transformation

Overview

Transformation functions allow administrators to manipulate CSV values at import time before mapping them to Zluri fields. These functions are evaluated during connector execution and remove the need for pre-processing CSV files outside Zluri.

Transformations should be used only when direct CSV-to-field mapping is insufficient.


Function Syntax Rules (Strict)

All transformation expressions must follow these rules:

  • Function names must be UPPERCASE

  • No spaces are allowed between function names, parentheses, or parameters

    CONCAT(field1,field2)

    CONCAT(field1, field2)

  • Nested functions are supported. For example: CONCAT(firstName,CONCAT(" ",lastName))

  • CSV column names must exactly match headers

  • String literals must be enclosed in quotes For example: CONCAT("EMP-",employeeId)

  • Functions are evaluated inside-out. For example: CONCAT(firstName,TRIM(lastName)) is the function. It’ll evaluate the expression TRIM(lastName) first and then evaluate the outer CONCAT.

  • Backtick(````) used as a delimiter if column name has spacing. For example: TRIM(Last Name)

General format:

FUNCTIONNAME(param1,param2)

Supported Functions

Text Functions


CONCAT

Combines multiple text values into a single string.

Syntax

CONCAT(value1,value2)

Input / Output Examples

InputExpressionOutput
firstName="John", lastName="Doe"CONCAT(firstName,lastName)"JohnDoe"
firstName="John", lastName="Doe"CONCAT(firstName,CONCAT(" ",lastName))"John Doe"
employeeId="123"CONCAT("EMP-",employeeId)"EMP-123"

TRIM

Removes leading and trailing whitespace from a value.

Syntax

TRIM(field)

Input / Output Examples

InputExpressionOutput
" John Doe "TRIM(name)"John Doe"
" [email protected] "TRIM(email)"[email protected]"

UPPERCASE

Converts all alphabetic characters to uppercase.

Syntax

UPPERCASE(field)

Input / Output Examples

InputExpressionOutput
"active"UPPERCASE(status)"ACTIVE"
"Engineering"UPPERCASE(department)"ENGINEERING"

LOWERCASE

Converts all alphabetic characters to lowercase.

Syntax

LOWERCASE(field)

Input / Output Examples

InputExpressionOutput
"[email protected]"LOWERCASE(email)"[email protected]"
"JohnDoe"LOWERCASE(username)"johndoe"

SUBSTRING

Extracts a portion of a string using zero-based indexing.

Syntax

SUBSTRING(field,start,length)

Input / Output Examples

InputExpressionOutput
"EMP12345"SUBSTRING(employeeId,0,3)"EMP"
"HelloWorld"SUBSTRING(text,0,5)"Hello"

SPLIT

Splits a string into an array using a delimiter.

Syntax

SPLIT(field,delimiter)

Input / Output Examples

InputExpressionOutput
"John Doe"SPLIT(fullName," ")["John","Doe"]
"tag1,tag2,tag3"SPLIT(tags,",")["tag1","tag2","tag3"]

Note: Output is an array. Index-based access is not supported.


REPLACE

Replaces matching patterns using regular expressions.

Syntax

REPLACE(field,pattern,replacement)

Input / Output Examples

InputExpressionOutput
"$99"REPLACE(price,"$","")"99"

Number Functions


NUMBER

Converts a text value to a numeric value.

Syntax

NUMBER(field)

Input / Output Examples

InputExpressionOutput
"12345"NUMBER(employeeId)12345
"99.99"NUMBER(price)99.99

STRING

Converts a value to text.

Syntax

STRING(field)

Input / Output Examples

InputExpressionOutput
12345STRING(employeeId)"12345"
trueSTRING(isActive)"true"

FLOOR

Rounds a numeric value down to the nearest integer.

Syntax

FLOOR(field)

Input / Output Examples

InputExpressionOutput
99.99FLOOR(price)99
4.7FLOOR(rating)4

Date Functions


DATETOMILLIS

Converts a date string into epoch milliseconds (UTC).

Syntax

DATETOMILLIS(dateValue,currentFormat)

Input / Output Examples

InputExpressionOutput
"15/01/2025"DATETOMILLIS(startDate,"[D01]/[M01]/[Y0001]")1736899200000
"2025-01-15"DATETOMILLIS(date,"[Y0001]-[M01]-[D01]")1736899200000

ISOTOMILLIS

Converts an ISO-8601 timestamp into epoch milliseconds.

Syntax

ISOTOMILLIS(isoDate)

Input / Output Examples

InputExpressionOutput
"2025-01-15T00:00:00Z"ISOTOMILLIS(createdAt)1736899200000
"2025-01-15T14:30:00Z"ISOTOMILLIS(lastLogin)1736952600000

MILLISTODATEFORMAT

Converts epoch milliseconds into a formatted date string.

Syntax

MILLISTODATEFORMAT(millisData,updatedFormat)

Input / Output Examples

InputExpressionOutput
1736899200000MILLISTODATEFORMAT(ts,"[Y0001]-[M01]-[D01]")"2025-01-15"
1736899200000MILLISTODATEFORMAT(ts,"[D01]/[M01]/[Y0001]")"15/01/2025"

Important Notes

  • All date conversions assume UTC
  • Empty or null values propagate as null unless explicitly transformed
  • Array outputs (from SPLIT) must map to list-compatible Zluri fields
  • Always validate mappings using sample CSV data before activation