Duaer

Organizations and data

How data is shaped between nodes

In Duaer, what one node hands to the next node is a list of items. On each item, ordinary fields live in json and files live in binary. Later nodes walk the items one by one.

What json and binary are on an item

A node output is an array. Each object in it is an item. An item always has json, which holds that row’s fields. When a file is attached, the same item also has binary.

In the table view, a nested object is collapsed under a bold field name. Open it to see the keys inside. In an expression you walk down with dots. The outer name alone is not enough.

[
  {
    "json": {
      "customerId": "c-18",
      "address": { "city": "Hangzhou" }
    },
    "binary": {
      "invoice": {
        "data": "<base64>",
        "mimeType": "application/pdf",
        "fileName": "invoice.pdf",
        "fileExtension": "pdf"
      }
    }
  }
]

How a Duaer node walks items

Most nodes run once per item. Twenty items in means the step runs twenty times, and each run sees only that item’s json. Execute Once in the node settings is the exception. It runs a single time with the first item.

Dragging a field from the input panel into a parameter inserts an expression that points at this item, such as {{ $json.customerId }}. The drag is a reference, not a copied value. When the previous step changes, the next run follows it.

Code nodes and custom nodes

If a JavaScript Code node forgets to wrap a result in json, the runtime adds that wrapper. From 0.166.0 it also accepts a returned array. A custom node does not get that repair. It has to return items that include json.

Each item you return is a separate row for the next node. Returning one item or many decides how many times later nodes run, and whether items can still be linked automatically. When they cannot, see How items stay linked through a run.

Questions

What does one item passed between Duaer nodes contain?

In Duaer, a node output is an array of items. Each item has json, which holds that row’s fields. When a file is attached, the same item also has binary. Most nodes run once per item: as many items come in, that many times the step runs.

What does dragging a field from the Duaer input panel insert?

In Duaer, dragging a field from the input panel into a parameter inserts an expression that points at the current item, such as {{ $json.customerId }}. The expression is a reference, not a copy of the value at that moment.

In this section