Hi everyone,
I’m trying to send measurement data in Cumulocity in TRANSIENT mode via a Smart Function in the Dynamic Mapper, so that the data is processed by Streaming Analytics but no measurement is stored in the database.
In my Smart Function, I currently push results like this:
return [{
cumulocityType: "measurement",
action: "create",
payload: {
"time": measuredAt,
"type": "mqtt-measurement",
"processingMode": "TRANSIENT",
"mqtt-measurement": {
"BatteryVoltage": {
"unit": "V",
"value": payload["data"]["a_batteryVoltage"]
}
}
},
externalSource: [
{ "type": "c8y_Serial", "externalId": payload["device_id"] }
]
});
The processingMode field is visible in the created measurement:
json{
"id": "4610994",
"type": "mqtt-measurement",
"time": "2026-07-09T12:00:06.142Z",
"processingMode": "TRANSIENT",
"mqtt-measurement": {
"BatteryVoltage": {
"unit": "V",
"value": 3.77
}
}
}
However, the measurement is still persisted in the database, so the TRANSIENT mode does not seem to have any effect in this case.
When I use a JSONata mapping instead, it works as expected and no measurement is stored. The working JSON looks like this:
json{
"time": "2026-07-09T08:14:49.389+02:00",
"type": "mqtt-measurement",
"_IDENTITY_": {
"externalId": "any_SerialNumber"
},
"_CONTEXT_DATA_": {
"api": "MEASUREMENT",
"processingMode": "TRANSIENT",
"deviceName": "generatedDevice",
"deviceType": "c8y_MQTTDevice"
}
}
How should the payload be structured in a Smart Function / Dynamic Mapper so that processingMode = TRANSIENT is actually respected and no measurement is stored?
Any examples or best practices would be really appreciated.
Kind regards
Valerian
