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
object
DataFlowTransformation<TInput, TOutput>
BatchTransformation<TInput, TOutput>
BlockTransformation<TInput, TOutput>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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()
Examples
BlockTransformation<InputType> block = new BlockTransformation<InputType>(
    inputData => {
        inputData.RemoveRange(1, 2);
        inputData.Add(new InputType() { Value = 1 });
        return inputData;
});

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

Declaration
    public BlockTransformation(Func<TInput[], TOutput[]> blockTransformationFunc)
Parameters
TypeNameDescription
System.Func<T, TResult><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
int
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<T, TResult><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
int
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
string
Overrides
ETLBox.DataFlow.Transformations.BatchTransformation<TInput, TOutput>.TaskName

Implements