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
object
DataFlowTransformation<TInput, TOutput>
BatchTransformation<TInput, TOutput>
CachedBatchTransformation<TInput, TOutput, TCache>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: ETLBox.DataFlow
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(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

System.Func<T1, T2, TResult><TInput[], System.Collections.Generic.IEnumerable<T><TCache>, TOutput[]>batchTransformationFunc

Sets the BatchTransformationFunc

CachedBatchTransformation(int)

Declaration
    public CachedBatchTransformation(int batchSize)
Parameters
TypeNameDescription
intbatchSize

The size of each batch

Properties

BatchTransformationFunc

Declaration
    public Func<TInput[], IEnumerable<TCache>, TOutput[]> BatchTransformationFunc { get; set; }
Property Value
TypeDescription
System.Func<T1, T2, TResult><TInput[], System.Collections.Generic.IEnumerable<T><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

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.BatchTransformation<TInput, TOutput>.TaskName

Methods

CheckParameter()

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

InvokeBatchTransformationFunc(TInput[])

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

InvokeInitActionOnce()

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

Implements