
Data Instance node
Data Instance Node
Overview
The Data Instance Node reshapes incoming payloads into a governed, model-shaped object by evaluating direct JavaScript expressions for each field.
It is ideal when you want a strongly-typed, well-documented data structure (often aligned with a Compose data model) but you still need full flexibility to calculate each field from raw inputs, combined sources, or other computed fields.
Unlike template-style nodes that use {{ }} expressions, Data Instance works with plain JavaScript code and an execution engine that:
- Resolves field dependencies (via
$fields) automatically. - Supports single objects, arrays, or merged inputs from multiple upstream nodes.
- Performs type conversion into common scalar types (String, Boolean, Int/UInt, Float, DateTime).
Configuration Reference
Model&Fields Configuration
Settings Configuration
Model&Fields (Dynamic Data)
| Field | Type | Default | Description |
|---|---|---|---|
| Model ID | string | "" | Optional reference to a Compose model. Used by the UI to auto-populate field definitions. |
| Fields | array | [] | List of field definitions that shape the output object. At least one field is required. |
| Error Mode | string | "continueAll" | Error handling strategy: "stopOnError" or "continueAll". |
Field Definition (fields[])
| Property | Type | Description |
|---|---|---|
| Name | string | Target field name (e.g., firstName, order.total). |
| Type | string | Output type (String, Boolean, Int8/16/32/64, UInt8/16/32/64, Float32/Float64, DateTime). |
| Expression | string | JavaScript code that returns the field value. Has access to $input and $fields. |
| Required (UI only) | boolean | Marks the field as required in the configuration UI; validation logic is currently enforced at pipeline level. |
| Sensitivity (UI only) | number | Sensitivity level 1–5 for data governance and UX; does not change runtime behavior. |
Settings (Static Configuration)
| Field | Type | Default | Description |
|---|---|---|---|
| Retry on Fail | boolean | false | Retries execution if the node encounters infrastructure issues. |
| On Error | string | "stopPipeline" | Node-level error strategy ("stopPipeline" or "continueExecution" depending on UI options). |
| Sync Mode | string | "all" | Controls input synchronization. "all" waits for all connected inputs (mapped to wait_all internally). |
| Wait Timeout | string | "30s" | Maximum time to wait for all inputs before failing when using Sync Mode = all. |
| Notes | string | "" | Internal documentation for why this transformation exists. |
| Display Note in Pipeline | boolean | false | Shows notes directly on the canvas for operators. |
Expression Examples
Simple Field Calculations
// Capitalize a name
$input.firstName.toUpperCase()
// Calculate year
new Date().getFullYear()
// Mark adults vs minors
$input.age >= 18
Using $fields for Dependencies
// fullName field
$input.firstName + ' ' + $input.lastName
// greeting field that reuses fullName
'Hello, ' + $fields.fullName
// totalPrice based on other calculated fields
$fields.unitPrice * $fields.quantity
Usage Examples
Example 1: Normalize User Profile Payload
| Field | Value |
|---|---|
| Model ID | (optional) userProfileModel |
| Error Mode | continueAll |
Fields:
| Name | Type | Expression |
|---|---|---|
firstName | String | $input.first_name |
lastName | String | $input.last_name |
age | Int32 | $input.age |
fullName | String | $fields.firstName + ' ' + $fields.lastName |
The node converts an arbitrary incoming object into a clean, typed user profile while gracefully handling missing values.
Example 2: Transform Arrays of Items
Upstream node sends an array of orders:
[
{ id: 'ORD-1', amount: 42.5, currency: 'USD' },
{ id: 'ORD-2', amount: 103.0, currency: 'USD' }
]
Fields:
| Name | Type | Expression |
|---|---|---|
orderId | String | $input.id |
amount | Float64 | $input.amount |
displayLabel | String | 'Order ' + $input.id + ' (' + $input.currency + ')' |
The output is an array of normalized order objects with consistent types and labels.
When to Use Data Instance
Use the Data Instance node when you need:
- A strongly-typed, governed data model in the middle of a pipeline.
- Complex field calculations using full JavaScript rather than inline
{{ }}expressions. - To merge data from multiple upstream nodes into a single, well-structured object.

