SaveTimeRangeSeriesInArchiveNodeConfiguration
Namespace: Meshmakers.Octo.MeshAdapter.Nodes.Load
SaveTimeRangeSeriesInArchive node configuration. Ingests whole series of windowed
measurements — each series being one anchor entity plus its list of [from, to) values —
into a TimeRangeArchive, in a single node.
public record SaveTimeRangeSeriesInArchiveNodeConfiguration : PathNodeConfiguration, INodeConfiguration, IEquatable<NodeConfiguration>, IPathNodeConfiguration, IEquatable<PathNodeConfiguration>, IEquatable<SaveTimeRangeSeriesInArchiveNodeConfiguration>
Inheritance Object → NodeConfiguration → PathNodeConfiguration → SaveTimeRangeSeriesInArchiveNodeConfiguration
Implements INodeConfiguration, IEquatable<NodeConfiguration>, IPathNodeConfiguration, IEquatable<PathNodeConfiguration>, IEquatable<SaveTimeRangeSeriesInArchiveNodeConfiguration>
Remarks:
Why this exists. The composition it replaces (ForEach over the values →
CreateUpdateInfo@1 + CreateAssociationUpdate@1 per value → Flatten →
UpdateRtEntityIfNewer@1 → ApplyChanges@2 → SaveTimeRangeStreamDataInArchive@1)
materialises one full runtime entity per measured window in order to write one time-series row.
Measured on a real EDA replay that is ~12.8 ms and roughly two dozen node executions per
15-minute slot, and 316,268 slots took 75 minutes — with the database nowhere near the
bottleneck. The runtime model only ever needs one anchor entity per series, so the
per-value entity round trip is pure overhead.
What it does. Resolves each series' anchor entity by SaveTimeRangeSeriesInArchiveNodeConfiguration.WellKnownNameFormat
(one batched query for all series), creates the ones that do not exist yet together with their
parent association, advances the anchor's own attributes to the series' newest value, persists
that small set of entities, and only then writes every windowed value to the archive in one
bulk insert. The anchor write happens first on purpose, and that order is what keeps the archive
free of rows whose source entity does not exist: every RtId handed to the archive was either read
from the runtime store or written and confirmed, and a failed anchor write throws instead of
continuing. It is an invariant of this node, not a check performed afterwards — the post-hoc
orphan guard in SaveTimeRangeStreamDataInArchive@1 does not apply here.
Ordering. This node does not decide which of two deliveries for the same window wins —
the archive does, via its opt-in ConflictPrecedence (System.StreamData 1.13.0), an ordered
list of keys compared lexicographically. Map the columns that rank a delivery — a quality code,
the source document's own date — into the archive via SaveTimeRangeSeriesInArchiveNodeConfiguration.Columns, declare them as the
archive's precedence keys, and the surviving value is the same whichever write arrives first.
Writes that are equal in every key are not ordered by them; the later write replaces the stored row.
Properties
Identity
Identity this node runs as: Caller (default), ServiceAccount, or System.
A missing value resolves to Caller (AB#5127).
public NodeExecutionIdentity Identity { get; set; }
Property Value
NodeExecutionIdentity
ArchiveRtId
Runtime id of the target TimeRangeArchive. Must exist, be activated, and declare a
column for every entry in SaveTimeRangeSeriesInArchiveNodeConfiguration.Columns. Required.
public string ArchiveRtId { get; set; }
Property Value
CkTypeId
CK type of the anchor entity. Must match the archive's TargetCkTypeId, otherwise the
repository silently drops every row. Required.
public string CkTypeId { get; set; }
Property Value
ValuesProperty
Property name on a series object holding its array of windowed values. Required.
public string ValuesProperty { get; set; }
Property Value
WellKnownNameFormat
Template for the anchor's RtWellKnownName, with {PropertyName} placeholders
resolved against the series object — e.g. {MeteringPointRtId}_{MeterCode}. This is the
natural key that decides which series share an anchor, so it must be stable across runs.
Required.
public string WellKnownNameFormat { get; set; }
Property Value
FromProperty
Property name on a value holding the inclusive window start. Required.
public string FromProperty { get; set; }
Property Value
ToProperty
Property name on a value holding the exclusive window end. Required.
public string ToProperty { get; set; }
Property Value
Columns
The archive columns and where each one's value comes from. Required and non-empty: a series write with no columns would store nothing but window boundaries.
public List<TimeRangeSeriesColumn> Columns { get; set; }
Property Value
Remarks:
A concrete List<T> on purpose. Pipeline definitions are deserialized by
YamlDotNet, which has no node deserializer for IReadOnlyList<T> — a config
declaring one compiles, unit-tests fine (C# constructs it directly) and then fails at
registration with "No node deserializer was able to deserialize the node into type
IReadOnlyList<T>". Every other node config in this assembly uses
ICollection<T> or List<T>.
AnchorWindowFromAttribute
Attribute path on the anchor entity that receives the winning value's window start (e.g.
TimeRange.From). Optional — when unset the anchor carries only the mapped
SaveTimeRangeSeriesInArchiveNodeConfiguration.Columns.
public string AnchorWindowFromAttribute { get; set; }
Property Value
AnchorWindowToAttribute
Attribute path on the anchor entity that receives the winning value's window end (e.g.
TimeRange.To). Optional, but it is also the tie-breaker: when set, a series only
advances its existing anchor if its newest window ends later than the one already stored, so
a back-filled or re-delivered older series cannot regress the anchor. When unset the anchor
is always advanced to the series' last value in document order.
public string AnchorWindowToAttribute { get; set; }
Property Value
ParentRtIdProperty
Property name on the series object holding the RtId of the parent the anchor is associated to. Optional — when unset no association is created. When set, SaveTimeRangeSeriesInArchiveNodeConfiguration.ParentCkTypeId and SaveTimeRangeSeriesInArchiveNodeConfiguration.ParentAssociationRoleId are required.
public string ParentRtIdProperty { get; set; }
Property Value
ParentCkTypeId
CK type of the parent entity. Required when SaveTimeRangeSeriesInArchiveNodeConfiguration.ParentRtIdProperty is set.
public string ParentCkTypeId { get; set; }
Property Value
ParentAssociationRoleId
Association role linking anchor to parent. Required when SaveTimeRangeSeriesInArchiveNodeConfiguration.ParentRtIdProperty is set.
public string ParentAssociationRoleId { get; set; }
Property Value
Path
public string Path { get; set; }
Property Value
Description
public string Description { get; set; }
Property Value
Constructors
SaveTimeRangeSeriesInArchiveNodeConfiguration()
Caution
Constructors of types with required members are not supported in this version of your compiler.
public SaveTimeRangeSeriesInArchiveNodeConfiguration()