Class CachedBatchTransformation<TInput, TOutput, TCache>

A batch transformation will transform batches of data. The default batch size are 100000 rows. The batch transformation function allows you to process and modify each batch of data. You can use the BatchSize property to choose a smaller batch size. The batch size must always be smaller than the max buffer size. The default batch size are 1000 rows per batch. The batch transformation is a partial blocking transformation - it will always need at least enough memory to store a whole batch.

Inheritance
System.Object
DataFlowTransformation<TInput, TOutput>
BatchTransformation<TInput, TOutput>
CachedBatchTransformation<TInput, TOutput, TCache>
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 CachedBatchTransformation<TInput, TOutput, TCache> : 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.

TCache

Type of data in the cache.

Constructors

CachedBatchTransformation()

Declaration
    public CachedBatchTransformation()

CachedBatchTransformation(Int32)

Declaration
    public CachedBatchTransformation(int batchSize)
Parameters
TypeNameDescription
System.Int32batchSize

The size of each batch

CachedBatchTransformation(Int32, Func<TInput[], ICollection<TCache>, TOutput[]>)

Declaration
    public CachedBatchTransformation(int batchSize, Func<TInput[], ICollection<TCache>, TOutput[]> batchTransformationFunc)
Parameters
TypeNameDescription
System.Int32batchSize

The size of each batch

System.Func<TInput[], System.Collections.Generic.ICollection<TCache>, TOutput[]>batchTransformationFunc

Sets the BatchTransformationFunc

Properties

BatchTransformationFunc

Declaration
    public Func<TInput[], ICollection<TCache>, TOutput[]> BatchTransformationFunc { get; set; }
Property Value
TypeDescription
System.Func<TInput[], System.Collections.Generic.ICollection<TCache>, TOutput[]>

CacheManager

The CacheManager to use when caching data

Declaration
    public ICacheManager<TInput, TCache> CacheManager { get; }
Property Value
TypeDescription
ICacheManager<TInput, TCache>

FillCacheAfterTranformation

If set to true, the incoming row will be added to the cache after the transformation func has been invoked.

Declaration
    public bool FillCacheAfterTranformation { get; set; }
Property Value
TypeDescription
System.Boolean

MaxCacheSize

The maximum amount of previously records to store

Declaration
    public int MaxCacheSize { get; set; }
Property Value
TypeDescription
System.Int32

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

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides
ETLBox.DataFlow.Transformations.BatchTransformation<TInput, TOutput>.CheckParameter()

InvokeBatchTransformationFunc(TInput[])

Declaration
    protected override TOutput[] InvokeBatchTransformationFunc(TInput[] batch)
Parameters
TypeNameDescription
TInput[]batch
Returns
TypeDescription
TOutput[]
Overrides
ETLBox.DataFlow.Transformations.BatchTransformation<TInput, TOutput>.InvokeBatchTransformationFunc(TInput[])

InvokeInitActionOnce()

Declaration
    protected override void InvokeInitActionOnce()
Overrides
ETLBox.DataFlow.Transformations.BatchTransformation<TInput, TOutput>.InvokeInitActionOnce()

Implements