Formula
Append a new column whose value is the result of evaluating a per-row expression in CEL — Google’s Common Expression Language. Each input row is passed to the expression as the evaluation context, with column names available as variables. Use it to derive computed fields (totals, ratios, formatted strings), conditional flags, or normalized values from existing columns.
How it works
Section titled “How it works”Formula is a streaming transform: each input row is evaluated independently and emitted with one extra column appended. CEL expressions are parsed once when the transform starts and reused per row, so per-row evaluation is fast even on large inputs.
The CEL flavor used is @marcbachmann/cel-js. The transform additionally registers cross-type arithmetic operators (mixed int and dyn<double>) so that integer literals work naturally with column values that arrive as JavaScript numbers, e.g. Amount * -1 does not require a cast. See apps/web/src/transforms/computed-column/logic.ts:23-38.
If either the expression or the output column name is empty, rows pass through unchanged.
Input: One tabular data connection. Output: The same columns plus the new computed column appended at the right.
Options
Section titled “Options”| Option | Type | Description |
|---|---|---|
expression | string | CEL expression evaluated once per row. Required to compute a value. |
outputColumn | string | Name of the column to append. If a column with this name exists, it is overwritten. Required to compute a value. |
Both default to empty string. With either empty, the transform is a passthrough.
Referring to columns
Section titled “Referring to columns”Inside the expression, columns are available as bare identifiers. Examples: price, status, signup_year.
For columns whose names contain spaces, hyphens, or other non-identifier characters, use FileBender’s bracket-syntax: [Column Name]. The transform rewrites bracketed references to internal safe identifiers before parsing, so [First Name] + " " + [Last Name] works. See apps/web/src/transforms/computed-column/logic.ts:42-64.
The bracket-syntax is a FileBender extension, not part of CEL. It runs as a preprocessor before the expression is parsed.
Examples
Section titled “Examples”Compute a total from quantity and price
Section titled “Compute a total from quantity and price”You have an order line items table and want a total column derived from quantity * price.
Before:
| product | quantity | price |
|---|---|---|
| Widget | 3 | 10 |
| Gadget | 1 | 25 |
| Doohickey | 5 | 4 |
Configuration: expression: quantity * price, output column: total.
After:
| product | quantity | price | total |
|---|---|---|---|
| Widget | 3 | 10 | 30 |
| Gadget | 1 | 25 | 25 |
| Doohickey | 5 | 4 | 20 |
Concatenate columns with bracket syntax
Section titled “Concatenate columns with bracket syntax”The source table has column names with spaces. You want a full_name column built from them.
Before:
| First Name | Last Name | |
|---|---|---|
| Alice | Anderson | [email protected] |
| Bob | Brown | [email protected] |
| Carol | Chen | [email protected] |
Configuration: expression: [First Name] + " " + [Last Name], output column: full_name.
After:
| First Name | Last Name | full_name | |
|---|---|---|---|
| Alice | Anderson | [email protected] | Alice Anderson |
| Bob | Brown | [email protected] | Bob Brown |
| Carol | Chen | [email protected] | Carol Chen |
Conditional flag with a CEL ternary
Section titled “Conditional flag with a CEL ternary”You want a flagged column that is true when amount exceeds 1000, otherwise false.
Before:
| customer | amount |
|---|---|
| Acme Corp | 250 |
| Beta Inc | 1500 |
| Gamma LLC | 800 |
| Delta Co | 3000 |
Configuration: expression: amount > 1000 ? true : false, output column: flagged.
After:
| customer | amount | flagged |
|---|---|---|
| Acme Corp | 250 | false |
| Beta Inc | 1500 | true |
| Gamma LLC | 800 | false |
| Delta Co | 3000 | true |
Tips and Edge Cases
Section titled “Tips and Edge Cases”- The bracket syntax is a FileBender extension, not part of CEL. It is a textual preprocessor: every
[Column Name]token is replaced with a safe internal identifier before the expression is handed to the CEL parser. Nested brackets and dynamic column-name strings are not supported. Mixing styles is fine:price * [Tax Rate]works. Seeapps/web/src/transforms/computed-column/logic.ts:42-64. - Per-row evaluation errors drop the offending row. When CEL evaluation throws for a row (e.g. dividing by zero, accessing a column that doesn’t exist on that specific row), the transform yields an error result for that row. Downstream transforms see the row as missing rather than as null. See
apps/web/src/transforms/computed-column/logic.ts:137-143. - A bad expression silently drops every row. If the CEL expression itself fails to parse, every row through the transform yields an error result, so downstream transforms receive nothing. The configuration UI surfaces the parse error, but if the flow auto-runs from a saved config that no longer parses (e.g. a referenced column was renamed upstream), the flow will appear to drop all rows. See
apps/web/src/transforms/computed-column/logic.ts:95-112.
Related Transforms
Section titled “Related Transforms”- Add Column — append a static value (no expression).
- Replace Values — rewrite values in an existing column rather than appending a new one.
- Change Type — convert strings to numbers / booleans / dates before using them in arithmetic.
- CEL Expression Language — full syntax reference for operators, built-in functions, and column reference styles.