Class RowDuplication<TInput>
Creates one or more duplicates of your incoming row. Use the CanDuplicate property if you want to duplicate only particular rows.
Implements
IDataFlowTransformation<TInput, TInput>
IDataFlowSource<TInput>
IDataFlowDestination<TInput>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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()
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);
RowDuplication(int)
Declaration
public RowDuplication(int numberOfDuplicates)
Parameters
Type | Name | Description |
---|---|---|
int | numberOfDuplicates | Sets the NumberOfDuplicates |
RowDuplication(Predicate<TInput>, int)
Declaration
public RowDuplication(Predicate<TInput> canDuplicate, int numberOfDuplicates)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<T><TInput> | canDuplicate | Sets the CanDuplicate predicate |
int | numberOfDuplicates | Sets the NumberOfDuplicates |
RowDuplication(Predicate<TInput>)
Declaration
public RowDuplication(Predicate<TInput> canDuplicate)
Parameters
Type | Name | Description |
---|---|---|
System.Predicate<T><TInput> | canDuplicate | Sets the CanDuplicate predicate |
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<T><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 |
---|---|
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
Type | Description |
---|---|
System.Threading.Tasks.Dataflow.ISourceBlock<TOutput><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><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 |
---|---|
string |
Overrides
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
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);
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | e |
Overrides
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);
CleanUpOnSuccess()
Declaration
protected override void CleanUpOnSuccess()
Overrides
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);
InitComponent()
Declaration
protected override void InitComponent()
Overrides
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);