BlockTransformation<TInput, TOutput>
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
Implements
Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
Type Parameters
Name | Description |
---|---|
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
BlockTransformation(Func<TInput[], TOutput[]>)
Declaration
Parameters
Type | Name | Description |
---|---|---|
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
Property Value
Type | Description |
---|---|
int |
Overrides
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
Property Value
Type | Description |
---|---|
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
Property Value
Type | Description |
---|---|
int |