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>, IDataFlowLogging, 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[], IEnumerable<TCache>, TOutput[]>)

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

The size of each batch

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

Sets the BatchTransformationFunc

Properties

BatchTransformationFunc

Declaration
    public Func<TInput[], IEnumerable<TCache>, TOutput[]> BatchTransformationFunc { get; set; }
Property Value
TypeDescription
Func<TInput[], IEnumerable<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
bool

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