Skip to main content
Version: 2.0-beta.1
Data Instance Node interface

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

Data Instance Node parameters

Model & Fields Tab

Model&Fields Configuration

Data Instance Node settings

Settings Tab

Settings Configuration

Model&Fields (Dynamic Data)

FieldTypeDefaultDescription
Model IDstring""Optional reference to a Compose model. Used by the UI to auto-populate field definitions.
Fieldsarray[]List of field definitions that shape the output object. At least one field is required.
Error Modestring"continueAll"Error handling strategy: "stopOnError" or "continueAll".

Field Definition (fields[])

PropertyTypeDescription
NamestringTarget field name (e.g., firstName, order.total).
TypestringOutput type (String, Boolean, Int8/16/32/64, UInt8/16/32/64, Float32/Float64, DateTime).
ExpressionstringJavaScript code that returns the field value. Has access to $input and $fields.
Required (UI only)booleanMarks the field as required in the configuration UI; validation logic is currently enforced at pipeline level.
Sensitivity (UI only)numberSensitivity level 1–5 for data governance and UX; does not change runtime behavior.

Settings (Static Configuration)

FieldTypeDefaultDescription
Retry on FailbooleanfalseRetries execution if the node encounters infrastructure issues.
On Errorstring"stopPipeline"Node-level error strategy ("stopPipeline" or "continueExecution" depending on UI options).
Sync Modestring"all"Controls input synchronization. "all" waits for all connected inputs (mapped to wait_all internally).
Wait Timeoutstring"30s"Maximum time to wait for all inputs before failing when using Sync Mode = all.
Notesstring""Internal documentation for why this transformation exists.
Display Note in PipelinebooleanfalseShows 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

FieldValue
Model ID(optional) userProfileModel
Error ModecontinueAll

Fields:

NameTypeExpression
firstNameString$input.first_name
lastNameString$input.last_name
ageInt32$input.age
fullNameString$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:

NameTypeExpression
orderIdString$input.id
amountFloat64$input.amount
displayLabelString'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.