Hey
@sander075071,
The mapping needs to be a nested YAML object with one entry per field, not a single string with a JS object literal. That's why it treats work-order as a plain timeseries-string, a bare key with a string value is read as one scalar field, not a multi-field shape.
Instead of:
yaml
mapping:
work-order: |
({ orderId: "", productId: "", quantity: 0, status: "", operatorId: "", timestamp: "" })
do this:
yaml
mapping:
work-order:
orderId: "
.orderId"
productId: "
.productId"
quantity: "
.quantity"
status: "
.status"
operatorId: "
.operatorId"
timestamp: "
.timestamp"
Each field gets its own key matching your payload shape's fields, and the value is a reference into whatever you defined under sources: (or a constant/expression), not a JS object.
This mirrors how our reference example handles a multi-field model (a motor sub-model with speed/current/temperature/status is mapped the same nested way).