DataTransform
- Written as
- Input mapping
- Reads
- { Field: Read.Lines }
- Nodes
- Filter, Map, Length, Add…
Inputs
- <field>: { Field: path }expression
- Reads a value: Trigger for the request, or a step’s name for its output, then its fields.
- <field>: <literal>literal
- A number, string, true or false, list or object, taken as written.
- <field>: { <node>: … }expression
- Any expression node below, evaluated when the step runs.
Outputs
- <mapped input>object
- The object the mapping builds, which the step is called with. A path that resolves to nothing leaves its field out.
Expression nodes
Example
- ExecuteTool: Notify
Operations: [PostMessage]
Input:
channel: finance
overdue:
Filter:
Over: { Field: Read.Invoices }
As: Invoice
When: { GreaterThan: { Field: Invoice.DaysLate, Value: 30 } }
count:
Length:
Of: { Field: Read.Invoices }Reusing an expression
Declare an expression once under Functions and call it anywhere with FunctionCall. Its parameters are its only names: the body reads them, not the run’s values.
Functions:
- Name: OverLimit
Parameters: [Amount, Limit]
Body:
GreaterThan:
Field: Amount
Value: { Field: Limit }
Steps:
- Branch: Check
Cases:
- When:
FunctionCall:
Function: OverLimit
Args:
Amount: { Field: Read.Amount }
Limit: 500
Then:
- Wait: Approve
Operation: Clarification
Question: This refund is over the limit. Approve it?Bounded and repeatableAn expression gives the same value every time it reads the same values, and it cannot loop forever: every evaluation stops at the deployment’s expression ceiling, 1,000 nodes by default. A model step is the place for work that needs judgment.