Skip to main content

Sub-Transform Blocks

Sub-transform blocks are fields prefixed with _$ (underscore followed by dollar sign). They define reusable helper expressions that can be referenced by other transforms within the same transformation.

How they work

Unlike temporary fields (_-prefixed), sub-transform blocks are not evaluated immediately. Instead, they are stored in the derived context and can be referenced by name in other expressions.

Example

{ "price": 150 }

Key characteristics

  • _$ blocks are only accessible at the root level of transforms
  • They are added to the derived state as-is, without evaluation
  • They are not included in the final output
  • They can contain any valid expression

Compared to temporary fields

Feature_ (temporary)_$ (sub-transform block)
Evaluated immediatelyYesNo (stored for reference)
Available in derivedYesYes
Excluded from outputYesYes
PurposeIntermediate computationReusable definition