Class BlockTransformation<TInput, TOutput>

A block transformation will wait for all data from the flow to be loaded into its buffer. After all data is in the buffer, the transformation function is executed for the complete data and the result posted into the targets. The block transformations allows you to access all data in the flow in one generic collection. But as this block any processing until all data is buffered, it will also need to store the whole data in memory.

Inheritance
System.Object
DataFlowTransformation<TInput, TOutput>
BatchTransformation<TInput, TOutput>
BlockTransformation<TInput, TOutput>
Inherited Members
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 BlockTransformation<TInput, TOutput> : BatchTransformation<TInput, TOutput>, ILoggableTask, IDataFlowLogging, IDataFlowTransformation<TInput, TOutput>, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
NameDescription
TInput

Type of ingoing data.

TOutput

Type of outgoing data.

Examples
BlockTransformation<InputType> block = new BlockTransformation<InputType>(
    inputData => {
        inputData.RemoveRange(1, 2);
        inputData.Add(new InputType() { Value = 1 });
        return inputData;
});

Constructors

BlockTransformation()

Declaration
    public BlockTransformation()

BlockTransformation(Func<TInput[], TOutput[]>)

Declaration
    public BlockTransformation(Func<TInput[], TOutput[]> blockTransformationFunc)
Parameters
TypeNameDescription
System.Func<TInput[], TOutput[]>blockTransformationFunc

Sets the BlockTransformationFunc

Properties

BatchSize

The size of each batch that is passed to the BatchTransformation<TInput, TOutput> Default is 1000.

Declaration
    public override int BatchSize { get; set; }
Property Value
TypeDescription
System.Int32
Overrides
ETLBox.DataFlow.Transformations.BatchTransformation<TInput, TOutput>.BatchSize

BlockTransformationFunc

The transformation Func that is executed on the complete input data. It needs to return an array of output data, which doesn't need have to be the same length as the input array.

Declaration
    public Func<TInput[], TOutput[]> BlockTransformationFunc { get; set; }
Property Value
TypeDescription
System.Func<TInput[], TOutput[]>

MaxBufferSize

Each component can have one or more buffers to improve throughput and allow faster processing of data. Set this value to restrict the number of rows that can be stored in the buffer. The default value is -1 (unlimited)

Declaration
    public override int MaxBufferSize { get; set; }
Property Value
TypeDescription
System.Int32
Overrides

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
TypeDescription
System.String
Overrides
ETLBox.DataFlow.Transformations.BatchTransformation<TInput, TOutput>.TaskName

Implements