CachedBatchTransformation<TInput, TOutput, TCache>

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.

Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public class CachedBatchTransformation<TInput, TOutput, TCache> : BatchTransformation<TInput, TOutput>, IDataFlowTransformation<TInput, TOutput>, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
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(int)

Declaration
    public CachedBatchTransformation(int batchSize)
Parameters
TypeNameDescription
intbatchSize

The size of each batch

CachedBatchTransformation(int, Func<TInput[], CachedData<TCache>, TOutput[]>)

Declaration
    public CachedBatchTransformation(int batchSize, Func<TInput[], CachedData<TCache>, TOutput[]> batchTransformationFunc)
Parameters
TypeNameDescription
intbatchSize

The size of each batch

Func<TInput[], CachedData<TCache>, TOutput[]>batchTransformationFunc

Sets the BatchTransformationFunc

Properties

BatchTransformationFunc

Declaration
    public Func<TInput[], CachedData<TCache>, TOutput[]> BatchTransformationFunc { get; set; }
Property Value
TypeDescription
Func<TInput[], CachedData<TCache>, TOutput[]>

CacheManager

The CacheManager to use when caching data

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

MaxCacheSize

The maximum amount of previously records to store

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

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

InvokeBatchTransformationFunc(TInput[])

Declaration
    protected override TOutput[] InvokeBatchTransformationFunc(TInput[] batch)
Parameters
TypeNameDescription
TInput[]batch
Returns
TypeDescription
TOutput[]
Overrides

InvokeInitActionOnce()

Declaration
    protected override void InvokeInitActionOnce()
Overrides

Reset()

Declaration
    protected override void Reset()
Overrides

Implements