Class RowDuplication<TInput>

Creates one or more duplicates of your incoming row. Use the CanDuplicate property if you want to duplicate only particular rows.

Inheritance
DataFlowTransformation<TInput, TInput>
RowDuplication<TInput>
Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public class RowDuplication<TInput> : DataFlowTransformation<TInput, TInput>, IDataFlowLogging, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Type Parameters
NameDescription
TInput

Type of ingoing data.

Examples
var source = new DbSource<InputType>("SourceTable");
RowDuplication<InputType> duplication = new RowDuplication<InputType>(3);
var dest = new CsvDestination<InputType>("output.csv");
source.LinkTo(duplication).LinkTo(dest);

Constructors

RowDuplication()

Declaration
    public RowDuplication()

RowDuplication(int)

Declaration
    public RowDuplication(int numberOfDuplicates)
Parameters
TypeNameDescription
intnumberOfDuplicates

Sets the NumberOfDuplicates

RowDuplication(Predicate<TInput>)

Declaration
    public RowDuplication(Predicate<TInput> canDuplicate)
Parameters
TypeNameDescription
Predicate<TInput>canDuplicate

Sets the CanDuplicate predicate

RowDuplication(Predicate<TInput>, int)

Declaration
    public RowDuplication(Predicate<TInput> canDuplicate, int numberOfDuplicates)
Parameters
TypeNameDescription
Predicate<TInput>canDuplicate

Sets the CanDuplicate predicate

intnumberOfDuplicates

Sets the NumberOfDuplicates

Properties

CanDuplicate

A predicate that describe if a will be duplicated or not.

Declaration
    public Predicate<TInput> CanDuplicate { get; set; }
Property Value
TypeDescription
Predicate<TInput>

NumberOfDuplicates

Number of duplicates to be created for each ingoing row. Default is 1 (meaning the incoming row plus one copy).

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

SourceBlock

SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.

Declaration
    public override ISourceBlock<TInput> SourceBlock { get; }
Property Value
TypeDescription
ISourceBlock<TInput>
Overrides

TargetBlock

TargetBlock from the underlying TPL.Dataflow which is used as input buffer for the component.

Declaration
    public override ITargetBlock<TInput> TargetBlock { get; }
Property Value
TypeDescription
ITargetBlock<TInput>
Overrides

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CleanUpOnFaulted(Exception)

Declaration
    protected override void CleanUpOnFaulted(Exception e)
Parameters
TypeNameDescription
Exceptione
Overrides

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides

InitComponent()

Declaration
    protected override void InitComponent()
Overrides

Implements