SplitConsumptionRecord@1
Node SplitConsumptionRecord@1 splits consumption record messages (DATEN_CRMSG) that cover more than maxHours into several smaller messages of at most maxHours each. It works on the EdaMessage array produced by EdaReceiver@1 and is typically placed directly after it, so that long deliveries (e.g. a month of quarter-hour values) are processed in manageable pieces.
Adapter Prerequisites
Node Configuration
For fields path, targetPath, targetValueWriteMode, and targetValueKind, see Overview.
transformations:
- type: SplitConsumptionRecord@1
path: $.messages # array of EdaMessage objects
targetPath: $.messages
maxHours: 24 # maximum duration of one chunk in hours (default: 24)
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
path | string | Yes¹ | $ | Path to the array of EdaMessage objects |
targetPath | string | No | $ | Path where the resulting message array is written |
maxHours | int | No | 24 | Maximum number of hours per chunk; must be greater than 0 |
¹ The node fails if path is not set (null). If maxHours is 0 or negative, the node fails with MaxHours must be greater than 0.
Behavior
- Messages that are not
DATEN_CRMSG, have noRawContentor cannot be deserialized are passed through unchanged. If no array is found atpath, nothing is written. - A
DATEN_CRMSGis only split if one of itsEnergyblocks spans more thanmaxHours. The overall period (earliest start to latest end of allEnergyblocks) is cut into chunks ofmaxHours, starting at the period start as delivered (no time zone alignment). An energy position belongs to the chunk in which itsDTF(from) lies. - Each chunk becomes a new
EdaMessagewith its ownRawContent(re-serialized XML). ItsMessageId(in the headers and in the XML) gets a suffix_001,_002, ...; theConversationIdstays the same. Chunks without energy positions are skipped; if no chunk remains, the original message is kept. - As with
EdaReceiver@1, the energy data is only contained inRawContent, not inMessage.
The configuration properties are documented in the API reference.
Complete sample of pipeline configuration
triggers:
- type: FromPolling@1
interval: 00:01:00
transformations:
- type: EdaReceiver@1
targetPath: $.messages
- type: SplitConsumptionRecord@1
path: $.messages
targetPath: $.messages
maxHours: 24