• Getting started
  • API Documentation
  • Pricing
  • Contact
Show / Hide Table of Contents
  • ETLBox.Connection
    • AccessOdbcConnectionManager
    • AdomdConnectionManager
    • ConnectionManagerType
    • Db2ConnectionManager
    • Db2ConnectionString
    • DbConnectionManager<Connection>
    • DbConnectionString<T, TBuilder>
    • IConnectionManager
    • IDbConnectionString
    • MariaDbConnectionManager
    • MariaDbConnectionString
    • MySqlConnectionManager
    • MySqlConnectionString
    • MySqlOdbcConnectionManager
    • OdbcConnectionManager
    • OdbcConnectionString
    • OleDbConnectionManager
    • OleDbConnectionString
    • OracleConnectionManager
    • OracleConnectionString
    • OracleOdbcConnectionManager
    • PostgresConnectionManager
    • PostgresConnectionString
    • PostgresOdbcConnectionManager
    • SqlConnectionManager
    • SqlConnectionString
    • SQLiteConnectionManager
    • SQLiteConnectionString
    • SqlOdbcConnectionManager
    • SqlOleDbConnectionManager
  • ETLBox.ControlFlow
    • ControlFlow
    • ControlFlowTask
    • DbTask
    • DropTask<T>
    • IfExistsTask
    • ILoggableTask
    • ITableData
    • LoggableTask
    • ProcedureDefinition
    • ProcedureParameter
    • QueryParameter
    • TableColumn
    • TableData
    • TableData<T>
    • TableDefinition
  • ETLBox.ControlFlow.Tasks
    • CalculateDatabaseHashTask
    • CleanUpSchemaTask
    • CreateDatabaseTask
    • CreateIndexTask
    • CreateProcedureTask
    • CreateSchemaTask
    • CreateTableTask
    • CreateViewTask
    • DropDatabaseTask
    • DropIndexTask
    • DropProcedureTask
    • DropSchemaTask
    • DropTableTask
    • DropViewTask
    • GetDatabaseListTask
    • IfDatabaseExistsTask
    • IfIndexExistsTask
    • IfProcedureExistsTask
    • IfSchemaExistsTask
    • IfTableOrViewExistsTask
    • RecoveryModel
    • RowCountOptions
    • RowCountTask
    • SqlTask
    • TruncateTableTask
    • XmlaTask
  • ETLBox.DataFlow
    • AggregateColumn
    • ChangeAction
    • ColumnMap
    • CompareColumn
    • DataFlow
    • DataFlowBatchDestination<TInput>
    • DataFlowComponent
    • DataFlowDestination<TInput>
    • DataFlowExecutableSource<TOutput>
    • DataFlowJoinTarget<TInput>
    • DataFlowSource<TOutput>
    • DataFlowStreamDestination<TInput>
    • DataFlowStreamSource<TOutput>
    • DataFlowTransformation<TInput, TOutput>
    • DeleteColumn
    • DistinctColumn
    • ErrorSource
    • ETLBoxError
    • ExcelColumn
    • ExcelRange
    • GroupColumn
    • ICacheManager<TInput, TCache>
    • IDataFlowBatchDestination
    • IDataFlowBatchDestination<TInput>
    • IDataFlowComponent
    • IDataFlowDestination
    • IDataFlowDestination<TInput>
    • IDataFlowExecutableSource
    • IDataFlowExecutableSource<TOutput>
    • IDataFlowLogging
    • IDataFlowSource
    • IDataFlowSource<TOutput>
    • IDataFlowStreamDestination
    • IDataFlowStreamDestination<TInput>
    • IDataFlowStreamSource
    • IDataFlowStreamSource<TOutput>
    • IDataFlowTransformation<TInput, TOutput>
    • IDataFlowTransformation<TOutput>
    • IdColumn
    • IMergeableRow
    • JoinTarget<TInput>
    • MatchColumn
    • MemoryCache<TInput, TCache>
    • MergeableRow
    • MergeMode
    • MergeProperties
    • Network
    • ResourceType
    • RetrieveColumn
    • StreamMetaData
    • TypeInfo
    • UpdateColumn
  • ETLBox.DataFlow.Connectors
    • ConcurrentMemoryDestination
    • ConcurrentMemoryDestination<TInput>
    • CsvDestination
    • CsvDestination<TInput>
    • CsvSource
    • CsvSource<TOutput>
    • CustomBatchDestination
    • CustomBatchDestination<TInput>
    • CustomBatchSource
    • CustomBatchSource<TOutput>
    • CustomDestination
    • CustomDestination<TInput>
    • CustomSource
    • CustomSource<TOutput>
    • DbDestination
    • DbDestination<TInput>
    • DbMerge
    • DbMerge<TInput>
    • DbSource
    • DbSource<TOutput>
    • ExcelSource
    • ExcelSource<TOutput>
    • JsonDestination
    • JsonDestination<TInput>
    • JsonSource
    • JsonSource<TOutput>
    • MemoryDestination
    • MemoryDestination<TInput>
    • MemorySource
    • MemorySource<TOutput>
    • TextDestination
    • TextDestination<TInput>
    • TextSource
    • TextSource<TOutput>
    • VoidDestination
    • VoidDestination<TInput>
    • XmlDestination
    • XmlDestination<TInput>
    • XmlSource
    • XmlSource<TOutput>
  • ETLBox.DataFlow.Transformations
    • Aggregation
    • Aggregation<TInput, TOutput>
    • AggregationMethod
    • BatchTransformation
    • BatchTransformation<TInput, TOutput>
    • BatchTransformation<TInput>
    • BlockTransformation
    • BlockTransformation<TInput, TOutput>
    • BlockTransformation<TInput>
    • CachedBatchTransformation
    • CachedBatchTransformation<TInput, TOutput, TCache>
    • CachedBatchTransformation<TInput, TOutput>
    • CachedBatchTransformation<TInput>
    • CachedRowTransformation
    • CachedRowTransformation<TInput, TOutput, TCache>
    • CachedRowTransformation<TInput, TOutput>
    • CachedRowTransformation<TInput>
    • CacheMode
    • ColumnRename
    • ColumnRename<TInput>
    • CrossJoin
    • CrossJoin<TInput>
    • CrossJoin<TInput1, TInput2, TOutput>
    • CrossJoin<TInput1, TInput2, TOutput>.InMemoryDestination<TInput>
    • Distinct<TInput>
    • LookupTransformation
    • LookupTransformation<TInput, TSource>
    • LookupTransformation<TInput, TSource>.PartialDbCacheSettings
    • MergeJoin
    • MergeJoin<TInput>
    • MergeJoin<TInput1, TInput2, TOutput>
    • Multicast
    • Multicast<TInput>
    • RowDuplication
    • RowDuplication<TInput>
    • RowMultiplication
    • RowMultiplication<TInput, TOutput>
    • RowMultiplication<TInput>
    • RowTransformation
    • RowTransformation<TInput, TOutput>
    • RowTransformation<TInput>
    • Sort
    • Sort<TInput>
    • XmlSchemaValidation
    • XmlSchemaValidation<TInput>
  • ETLBox.Exceptions
    • ETLBoxException
    • ETLBoxFaultedBufferException
    • ETLBoxNotSupportedException
  • ETLBox.Helper
    • BatchLinq
    • BulkSqlGenerator<T>
    • DataTypeConverter
    • ExpandoJsonPathConverter
    • HashHelper
    • IDataTypeConverter
    • JsonPathConverter
    • JsonProperty2JsonPath
    • JsonProperty2JsonPath.MultipleResultsInPath
    • ObjectNameDescriptor
    • PropertyInfoExtension
    • SqlParser
    • StringExtension
  • ETLBox.Logging
    • AbortLoadProcessTask
    • CreateErrorTableTask
    • CreateLoadProcessTableTask
    • CreateLogTableTask
    • CustomTask
    • EndLoadProcessTask
    • ETLLogLayoutRenderer
    • GetLoadProcessAsJSONTask
    • GetLogAsJSONTask
    • LoadProcess
    • LogEntry
    • Logging
    • LogHierarchyEntry
    • LogTask
    • Package
    • ReadLoadProcessTableTask
    • ReadLogTableTask
    • ReadOptions
    • Sequence
    • Sequence<T>
    • StartLoadProcessTask

Class Aggregation<TInput, TOutput>

Aggregates data by the given aggregation methods. The aggregate is a partial-blocking transformation - only the aggregation values are stored in separate memory objects. When all rows have been processed by the aggregation, the aggregated values are written into the output.

Inheritance
System.Object
LoggableTask
DataFlowComponent
DataFlowSource<TOutput>
DataFlowTransformation<TInput, TOutput>
Aggregation<TInput, TOutput>
Aggregation
Implements
ILoggableTask
IDataFlowLogging
IDataFlowTransformation<TInput, TOutput>
IDataFlowSource<TOutput>
IDataFlowSource
IDataFlowDestination<TInput>
IDataFlowDestination
IDataFlowComponent
Inherited Members
DataFlowTransformation<TInput, TOutput>.TargetBlock
DataFlowSource<TOutput>.LinkTo(IDataFlowDestination<TOutput>)
DataFlowSource<TOutput>.LinkTo(IDataFlowDestination<TOutput>, Predicate<TOutput>)
DataFlowSource<TOutput>.LinkTo(IDataFlowDestination<TOutput>, Predicate<TOutput>, Predicate<TOutput>)
DataFlowSource<TOutput>.LinkTo<TConvert>(IDataFlowDestination<TOutput>)
DataFlowSource<TOutput>.LinkTo<TConvert>(IDataFlowDestination<TOutput>, Predicate<TOutput>)
DataFlowSource<TOutput>.LinkTo<TConvert>(IDataFlowDestination<TOutput>, Predicate<TOutput>, Predicate<TOutput>)
DataFlowSource<TOutput>.LinkErrorTo(IDataFlowDestination<ETLBoxError>)
DataFlowComponent.MaxBufferSize
DataFlowComponent._maxBufferSize
DataFlowComponent.Predecessors
DataFlowComponent.Successors
DataFlowComponent.Completion
DataFlowComponent.WasComponentInitialized
DataFlowComponent.ReadyForProcessing
DataFlowComponent.WasLinked
DataFlowComponent.SetParent(DataFlowComponent)
DataFlowComponent.InternalLinkTo<T>(IDataFlowDestination, Object, Object)
DataFlowComponent.LinkBuffersRecursively()
DataFlowComponent.InitBufferObjects()
DataFlowComponent.SetCompletionTask()
DataFlowComponent.RunErrorSourceInit()
DataFlowComponent.OnCompletion
DataFlowComponent.CompleteOrFaultBufferOnPredecessorCompletion(Task)
DataFlowComponent.Exception
DataFlowComponent.ErrorSource
DataFlowComponent.HandleCanceledOrFaultedBuffer()
DataFlowComponent.InternalLinkErrorTo(IDataFlowDestination<ETLBoxError>)
DataFlowComponent.ThrowOrRedirectError(Exception, String)
DataFlowComponent.ThrowError(Exception, String)
DataFlowComponent._loggingThresholdRows
DataFlowComponent.LoggingThresholdRows
DataFlowComponent.ProgressCount
DataFlowComponent.HasLoggingThresholdRows
DataFlowComponent.ThresholdCount
DataFlowComponent.WasLoggingStarted
DataFlowComponent.WasLoggingFinished
DataFlowComponent.NLogStartOnce()
DataFlowComponent.NLogFinishOnce()
DataFlowComponent.LogProgressBatch_AfterThrowOrRedirectError(Int32)
DataFlowComponent.LogProgress_AfterThrowOrRedirectError(Boolean)
LoggableTask.TaskType
LoggableTask._disableLogging
LoggableTask.DisableLogging
LoggableTask.TaskHash
LoggableTask.CopyLogTaskProperties(ILoggableTask)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow.Transformations
Assembly: ETLBox.dll
Syntax
public class Aggregation<TInput, TOutput> : DataFlowTransformation<TInput, TOutput>, ILoggableTask, IDataFlowLogging, IDataFlowTransformation<TInput, TOutput>, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
Name Description
TInput

Type of ingoing data.

TOutput

Type of outgoing data.

Examples
public class MyDetailValue
{
    public int DetailValue { get; set; }
}

public class MyAggRow
{
    [AggregateColumn(nameof(MyDetailValue.DetailValue), AggregationMethod.Sum)]
    public int AggValue { get; set; }
}

var source = new DbSource<MyDetailValue>("DetailValues");
var agg = new Aggregation<MyDetailValue, MyAggRow>();
var dest = new MemoryDestination<MyAggRow>();
source.LinkTo<MyAggRow>(agg).LinkTo(dest);

Constructors

Aggregation()

Declaration
public Aggregation()

Aggregation(Action<TInput, TOutput>)

Declaration
public Aggregation(Action<TInput, TOutput> aggregationAction)
Parameters
Type Name Description
System.Action<TInput, TOutput> aggregationAction

Sets the AggregationAction

Aggregation(Action<TInput, TOutput>, Func<TInput, Object>)

Declaration
public Aggregation(Action<TInput, TOutput> aggregationAction, Func<TInput, object> groupingFunc)
Parameters
Type Name Description
System.Action<TInput, TOutput> aggregationAction

Sets the AggregationAction

System.Func<TInput, System.Object> groupingFunc

Sets the GroupingFunc

Aggregation(Action<TInput, TOutput>, Func<TInput, Object>, Action<Object, TOutput>)

Declaration
public Aggregation(Action<TInput, TOutput> aggregationAction, Func<TInput, object> groupingFunc, Action<object, TOutput> storeKeyAction)
Parameters
Type Name Description
System.Action<TInput, TOutput> aggregationAction

Sets the AggregationAction

System.Func<TInput, System.Object> groupingFunc

Sets the GroupingFunc

System.Action<System.Object, TOutput> storeKeyAction

Sets the StoreKeyAction

Properties

AggregateColumns

This list will be used to set the AggregationAction. This also works with ExpandoObjects.

Declaration
public IEnumerable<AggregateColumn> AggregateColumns { get; set; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<AggregateColumn>

AggregationAction

This action describes how the input data is aggregated. Not needed if you use the AggregateColumn in your object or pass a list to the AggregateColumns property.

Declaration
public Action<TInput, TOutput> AggregationAction { get; set; }
Property Value
Type Description
System.Action<TInput, TOutput>

GroupColumns

This list will be used to set the GroupingFunc and the StoreKeyAction. This also works with ExpandoObjects.

Declaration
public IEnumerable<GroupColumn> GroupColumns { get; set; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<GroupColumn>

GroupingFunc

This Func defines how the object for grouping data is retrieved. Not needed if you use the GroupColumn in your object or pass a list to the GroupColumns property.

Declaration
public Func<TInput, object> GroupingFunc { get; set; }
Property Value
Type Description
System.Func<TInput, System.Object>

SourceBlock

SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.

Declaration
public override ISourceBlock<TOutput> SourceBlock { get; }
Property Value
Type Description
System.Threading.Tasks.Dataflow.ISourceBlock<TOutput>
Overrides
ETLBox.DataFlow.DataFlowSource<TOutput>.SourceBlock

StoreKeyAction

This action defines how the grouping object is written back into the aggregated object. Not needed if you use the GroupColumn in your object or pass a list to the GroupColumns property.

Declaration
public Action<object, TOutput> StoreKeyAction { get; set; }
Property Value
Type Description
System.Action<System.Object, TOutput>

TargetBlock

TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.

Declaration
public override ITargetBlock<TInput> TargetBlock { get; }
Property Value
Type Description
System.Threading.Tasks.Dataflow.ITargetBlock<TInput>
Overrides
ETLBox.DataFlow.DataFlowTransformation<TInput, TOutput>.TargetBlock

TaskName

A name to identify the task or component. Every component or task comes with a default name that can be overwritten.

Declaration
public override string TaskName { get; set; }
Property Value
Type Description
System.String
Overrides
LoggableTask.TaskName

Methods

CheckParameter()

Declaration
protected override void CheckParameter()
Overrides
DataFlowComponent.CheckParameter()

CleanUpOnFaulted(Exception)

Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type Name Description
System.Exception e
Overrides
DataFlowComponent.CleanUpOnFaulted(Exception)

CleanUpOnSuccess()

Declaration
protected override void CleanUpOnSuccess()
Overrides
DataFlowComponent.CleanUpOnSuccess()

InitComponent()

Declaration
protected override void InitComponent()
Overrides
DataFlowComponent.InitComponent()

Implements

ILoggableTask
IDataFlowLogging
IDataFlowTransformation<TInput, TOutput>
IDataFlowSource<TOutput>
IDataFlowSource
IDataFlowDestination<TInput>
IDataFlowDestination
IDataFlowComponent
Back to top Crafted with <3 in Berlin
Contact & legal notice