Skip to main content

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)
PropertyTypeRequiredDefaultDescription
pathstringYes¹$Path to the array of EdaMessage objects
targetPathstringNo$Path where the resulting message array is written
maxHoursintNo24Maximum 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 no RawContent or cannot be deserialized are passed through unchanged. If no array is found at path, nothing is written.
  • A DATEN_CRMSG is only split if one of its Energy blocks spans more than maxHours. The overall period (earliest start to latest end of all Energy blocks) is cut into chunks of maxHours, starting at the period start as delivered (no time zone alignment). An energy position belongs to the chunk in which its DTF (from) lies.
  • Each chunk becomes a new EdaMessage with its own RawContent (re-serialized XML). Its MessageId (in the headers and in the XML) gets a suffix _001, _002, ...; the ConversationId stays 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 in RawContent, not in Message.

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