Search Results for

    Show / Hide Table of Contents

    Class AggregateTransform<TInput, TAccumulate, TOutput>

    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 (if any) can all have different types.

    Note: Use the factory methods in AggregateTransformFactory to create instances of this class. Also see the examples in Dataflow Aggregations.

    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
    Object
    WorkerParent
    WorkerBase
    WorkerBase<AggregateTransform<TInput, TAccumulate, TOutput>>
    AggregateTransform<TInput, TAccumulate, TOutput>
    Implements
    IDisposeOnFinished
    Inherited Members
    WorkerBase<AggregateTransform<TInput, TAccumulate, TOutput>>.AddCompletedCallback(Func<AggregateTransform<TInput, TAccumulate, TOutput>, OutcomeStatus, Task<OutcomeStatus>>)
    WorkerBase<AggregateTransform<TInput, TAccumulate, TOutput>>.AddRanCallback(Func<AggregateTransform<TInput, TAccumulate, TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
    WorkerBase<AggregateTransform<TInput, TAccumulate, TOutput>>.AddStartingCallback(Func<AggregateTransform<TInput, TAccumulate, TOutput>, Task<ProgressStatus>>)
    WorkerBase.AddCompletedCallback(Func<WorkerBase, OutcomeStatus, Task<OutcomeStatus>>)
    WorkerBase.AddRanCallback(Func<WorkerBase, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
    WorkerBase.AddStartingCallback(Func<WorkerBase, Task<ProgressStatus>>)
    WorkerBase.DefaultIsStartable()
    WorkerBase.ErroredPortErrorsWorkerProtected
    WorkerBase.ErrorOutputs
    WorkerBase.EscalateError
    WorkerBase.Inputs
    WorkerBase.IsStartable
    WorkerBase.Outputs
    WorkerBase.Parent
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, WorkerBase, WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(TLastWorker)
    WorkerParent.AddChildCompletedCallback(Action<WorkerBase>)
    WorkerParent.AddStartingChildrenCallback(Func<WorkerParent, Task<ProgressStatus>>)
    WorkerParent.BytesPerRowBuffer
    WorkerParent.Children
    WorkerParent.DisposeOnFinished<TDisposable>(TDisposable)
    WorkerParent.GetDownstreamFactory<TInput>()
    WorkerParent.HasChildren
    WorkerParent.IsCanceled
    WorkerParent.IsCompleted
    WorkerParent.IsCreated
    WorkerParent.IsError
    WorkerParent.IsFailed
    WorkerParent.IsFatal
    WorkerParent.IsRunning
    WorkerParent.IsSucceeded
    WorkerParent.KeepChildrenLevels
    WorkerParent.Locator
    WorkerParent.LogFactory
    WorkerParent.Logger
    WorkerParent.MaxRunningChildren
    WorkerParent.Name
    WorkerParent.RemoveChildren()
    WorkerParent.RescheduleChildren()
    WorkerParent.RunChildrenAsync(Boolean)
    WorkerParent.RunChildrenAsync()
    WorkerParent.Status
    WorkerParent.Item[String]
    WorkerParent.ToString()
    WorkerParent.WorkerSystem
    WorkerParent.DebugCommands
    WorkerParent.AggregateErrorOutputRows
    WorkerParent.AggregateOutputRows
    WorkerParent.AggregateWorkersCompleted
    WorkerParent.InstantCompleted
    WorkerParent.InstantCreated
    WorkerParent.InstantStarted
    WorkerParent.RunningDuration
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public class AggregateTransform<TInput, TAccumulate, TOutput> : WorkerBase<AggregateTransform<TInput, TAccumulate, TOutput>>, IDisposeOnFinished where TInput : class where TOutput : class
    Type Parameters
    Name Description
    TInput

    The type of the input rows.

    TAccumulate

    The type of the accumulation seed. Can be a value type or a reference type.

    TOutput

    The type of the output row.

    Properties

    Input

    Gets the input port for consuming rows from the upstream worker.

    Declaration
    public InputPort<TInput> Input { get; }
    Property Value
    Type Description
    InputPort<TInput>

    Output

    Gets the output port for sending rows to the downstream worker.

    Declaration
    public OutputPort<TOutput> Output { get; }
    Property Value
    Type Description
    OutputPort<TOutput>

    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 Task<OutcomeStatus> RunAsync()
    Returns
    Type Description
    Task<OutcomeStatus>

    A Task describing the success or failure of the worker. An asynchronous async implementation would e.g. return OutcomeStatus.Succeeded on success, while a synchronous implementation would return OutcomeStatus.SucceededTask.

    Overrides
    WorkerParent.RunAsync()

    Implements

    IDisposeOnFinished

    See Also

    AggregateTransformFactory
    TransformAggregation<TInput, TAccumulate>
    IEqualityComparer<T>
    AggregateTransform<TInputAccumulateOutput>
    AggregateTransform<TInput, TAccumulateOutput>
    In This Article
    Back to top Copyright © 2023 Envobi Ltd