Class AggregateTransform<TInputAccumulateOutput>
A dataflow worker that uses callbacks to aggregate incoming rows, and optionally an equality comparer to group incoming rows. It outputs at most one row for all input rows or per unique grouping. The input rows, the accumulation, and the output row all have the same type.
Note: Use the factory methods in AggregateTransformFactory to create instances of this class.
Also see the examples in Dataflow Aggregations,
which cover IAggregationCommand predefined column aggregations (Sum
,
Average
etc.), RowAggregationFunction predefined row aggregations
(First
, Last
etc.), IGroupByCommand and IGroupByCopyCommand
GROUP BY commands, as well as creating custom aggregations and groupings.
Note that all dataflow workers must adhere to the Row Ownership rules.
This worker is fully blocking, i.e. it will only output row(s) after it has received all incoming rows. It will buffer (and therefore consume memory for) only a single accumulation (without grouping), or multiple accumulations corresponding to the number of unique groupings.
Inheritance
Implements
Inherited Members
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public class AggregateTransform<TInputAccumulateOutput> : WorkerBase<AggregateTransform<TInputAccumulateOutput>>, IDisposeOnFinished where TInputAccumulateOutput : class
Type Parameters
Name | Description |
---|---|
TInputAccumulateOutput | The type of each |
Properties
Input
Gets the input port for consuming rows from the upstream worker.
Declaration
public InputPort<TInputAccumulateOutput> Input { get; }
Property Value
Type | Description |
---|---|
InputPort<TInputAccumulateOutput> |
Output
Gets the output port for sending rows to the downstream worker.
Declaration
public OutputPort<TInputAccumulateOutput> Output { get; }
Property Value
Type | Description |
---|---|
OutputPort<TInputAccumulateOutput> |
Methods
RunAsync()
This method can be overridden to add custom functionality to the derived worker that runs before
and after the row processing. In this case, the base class base.RunAsync()
must
be called for the worker to function correctly.
Typically, this worker is used without overriding this method.
Declaration
protected override async Task<OutcomeStatus> RunAsync()
Returns
Type | Description |
---|---|
Task<OutcomeStatus> | A |