Creating an expression node
- Drag an Expression node onto the canvas
- Connect it to your data flow
- Click Edit Expression to open the editor
- Define output fields and their expressions
Expression structure
Each expression node produces an output object. You define fields and the expressions that calculate them:Accessing data
Reference input data using dot notation:Referencing previous nodes
Use$nodes to access output from any upstream node by its name:
Operators
Arithmetic
Comparison
Logical
Ternary (conditional)
Null handling
Range checks
Built-in functions
Math
| Function | Example | Result |
|---|---|---|
abs(n) | abs(-5) | 5 |
round(n) | round(3.7) | 4 |
floor(n) | floor(3.9) | 3 |
ceil(n) | ceil(3.1) | 4 |
min(arr) | min([3, 1, 4]) | 1 |
max(arr) | max([3, 1, 4]) | 4 |
sum(arr) | sum([1, 2, 3]) | 6 |
avg(arr) | avg([10, 20, 30]) | 20 |
String
| Function | Example | Result |
|---|---|---|
len(s) | len("hello") | 5 |
upper(s) | upper("hello") | "HELLO" |
lower(s) | lower("HELLO") | "hello" |
trim(s) | trim(" hi ") | "hi" |
contains(s, sub) | contains("hello", "ell") | true |
startsWith(s, prefix) | startsWith("hello", "he") | true |
split(s, delim) | split("a,b,c", ",") | ["a","b","c"] |
Array
| Function | Example | Result |
|---|---|---|
len(arr) | len([1, 2, 3]) | 3 |
map(arr, expr) | map([1, 2, 3], # * 2) | [2, 4, 6] |
filter(arr, expr) | filter([1, 2, 3, 4], # > 2) | [3, 4] |
some(arr, expr) | some([1, 2, 3], # > 2) | true |
all(arr, expr) | all([1, 2, 3], # > 0) | true |
flatMap(arr, expr) | flatMap([[1,2], [3]], #) | [1,2,3] |
# symbol represents each element when iterating over arrays.
Date
| Function | Example | Result |
|---|---|---|
d(str) | d("2024-01-15") | Date object |
d().year() | d("2024-01-15").year() | 2024 |
d().month() | d("2024-01-15").month() | 1 |
d().day() | d("2024-01-15").day() | 15 |
d().add(n, unit) | d("2024-01-15").add(7, "d") | 7 days later |
d().diff(d2, unit) | d("2024-01-15").diff("2024-01-01", "day") | 14 |