| OrchestratorConfigClusterMarker Property |
A predicate (boolean function) to identify records that cause cluster splits (either starting a new cluster or ending a cluster depending on the
MarkerStartsCluster setting).
It accepts 3 parameters: the current record, the previous record and the counter of records accumulated so far in the current cluster. Note that the previous record is null for the first record.
If the predicate returns true, it causes cluster split (before or after the current record depending on
MarkerStartsCluster value);
returning false causes continuation of record accumulation into the current cluster.
In case this function marks the first record of a cluster (i.e.
MarkerStartsCluster is true), then the current record starts a new set of records accumulated for a cluster;
otherwise (
MarkerStartsCluster is false, i.e. the function marks the last record of a cluster), the current record ends the set of records accumulated for a cluster, and a new empty
set of accumulated records is created.
If not specified, the default function will split clusters on every record, with one notable exception as follows:
In case of XML/JSON intake (
XML,
JSON or
UnboundJSON) and the
XmlJsonIntakeSettings setting
directing Data Conveyer to automatically detect clusters (ClusterNode or DetectClusters respectively), then Data Conveyer will respect clusters detected
from XML/JSON intake.
Here are is the default
ClusterMarker function:
(r, pr, i) => r.ClstrNo == 0 || pr == null || r.ClstrNo != pr.ClstrNo;
Function(r, pr, i) r.ClstrNo = 0 OrElse pr Is Nothing OrElse r.ClstrNo <> pr.ClstrNo
Any exception thrown by this function will cause the process shutdown with a completion status of
Failed.
Note |
---|
An astute reader may be asking what will happen when the automatic cluster detection during XML/JSON intake coexists with explicit (non-default)
ClusterMarker and MarkerStartsCluster settings. In this advanced scenario, the ClusterMarker function can
override the cluster assignment made by the XML/JSON intake. The ClstrNo property of the IRecord (either current or previous) can be used in a logic to
decide whether to return true (new cluster) or false (continue with old cluster).
|
Namespace:
Mavidian.DataConveyer.Orchestrators
Assembly:
DataConveyer (in DataConveyer.dll) Version: 3.4.6+1324144ff7
Syntax public Func<IRecord, IRecord, int, bool> ClusterMarker { get; set; }
Public Property ClusterMarker As Func(Of IRecord, IRecord, Integer, Boolean)
Get
Set
Property Value
Type:
FuncIRecord,
IRecord,
Int32,
BooleanSee Also