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
System.Object
DataFlowSource<TInput>
DataFlowTransformation<TInput, TInput>
RowDuplication<TInput>
Implements
IDataFlowTransformation<TInput, TInput>
IDataFlowSource<TInput>
IDataFlowDestination<TInput>
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 RowDuplication<TInput> : DataFlowTransformation<TInput, TInput>, IDataFlowLogging, ILoggableTask, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
Name | Description |
---|---|
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(Int32)
Declaration
public RowDuplication(int numberOfDuplicates)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | numberOfDuplicates | Sets the NumberOfDuplicates |
RowDuplication(Predicate<TInput>)
Declaration
public RowDuplication(Predicate<TInput> canDuplicate)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<TInput> | canDuplicate | Sets the CanDuplicate predicate |
RowDuplication(Predicate<TInput>, Int32)
Declaration
public RowDuplication(Predicate<TInput> canDuplicate, int numberOfDuplicates)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<TInput> | canDuplicate | Sets the CanDuplicate predicate |
System.Int32 | numberOfDuplicates | 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
Type | Description |
---|---|
System.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
Type | Description |
---|---|
System.Int32 |
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
Type | Description |
---|---|
System.Threading.Tasks.Dataflow.ISourceBlock<TInput> |
Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.SourceBlock
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
Type | Description |
---|---|
System.Threading.Tasks.Dataflow.ITargetBlock<TInput> |
Overrides
ETLBox.DataFlow.DataFlowTransformation<TInput, TInput>.TargetBlock
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
Type | Description |
---|---|
System.String |
Overrides
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | e |
Overrides
CleanUpOnSuccess()
Declaration
protected override void CleanUpOnSuccess()
Overrides
InitComponent()
Declaration
protected override void InitComponent()