Class FilterTransformation<TInput>

The FilterTransformation allows you to filter out rows that evaluate to a given predicate. By default the filter transformation will filter out null values.

Inheritance
object
DataFlowTransformation<TInput, TInput>
FilterTransformation<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 FilterTransformation<TInput> : DataFlowTransformation<TInput, TInput>, ILoggableTask, IDataFlowLogging, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent
Type Parameters
NameDescription
TInput

The type of ingoing data.

Constructors

FilterTransformation()

Declaration
    public FilterTransformation()

FilterTransformation(Predicate<TInput>)

Declaration
    public FilterTransformation(Predicate<TInput> filterPredicate)
Parameters
TypeNameDescription
System.Predicate<T><TInput>filterPredicate

Properties

FilterPredicate

The filter predicates is true for all rows that should be filtered out. The default value will filter out null values.

Declaration
    public Predicate<TInput> FilterPredicate { get; set; }
Property Value
TypeDescription
System.Predicate<T><TInput>

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
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
TypeDescription
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
TypeDescription
string
Overrides

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CleanUpOnFaulted(Exception)

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

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides

InitComponent()

Declaration
    protected override void InitComponent()
Overrides

LinkErrorTo(IDataFlowDestination<ETLBoxError>)

If an error occurs in the component, by default the component will throw an exception and stop execution. If you use the error linking, any erroneous records will be caught and redirected.

Declaration
    public override IDataFlowSource<ETLBoxError> LinkErrorTo(IDataFlowDestination<ETLBoxError> target)
Parameters
TypeNameDescription
IDataFlowDestination<ETLBoxError>target

The target for erroneous rows.

Returns
TypeDescription
IDataFlowSource<ETLBoxError>

The linked component.

Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.LinkErrorTo(ETLBox.DataFlow.IDataFlowDestination<ETLBox.DataFlow.ETLBoxError>)

LinkTo(IDataFlowDestination<TInput>, Predicate<TInput>, Predicate<TInput>)

Links the current block to another transformation or destination with a predicate for rows that you want to keep and a second predicate for rows you want to discard.

Declaration
    public override IDataFlowSource<TInput> LinkTo(IDataFlowDestination<TInput> target, Predicate<TInput> rowsToKeep, Predicate<TInput> rowsIntoVoid)
Parameters
TypeNameDescription
IDataFlowDestination<TInput>target
System.Predicate<T><TInput>rowsToKeep
System.Predicate<T><TInput>rowsIntoVoid
Returns
TypeDescription
IDataFlowSource<TInput>

The linked component.

Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.LinkTo(ETLBox.DataFlow.IDataFlowDestination<TInput>, System.Predicate<TInput>, System.Predicate<TInput>)

LinkTo(IDataFlowDestination<TInput>, Predicate<TInput>)

Links the current block to another transformation or destination with a predicate. Every component can be linked to one or more component. If you link multiple components, provide a System.Predicate<T> that describe which row is send to which target. Make sure that all rows will be send to a target - use the VoidDestination if you want to discarded rows.

Declaration
    public override IDataFlowSource<TInput> LinkTo(IDataFlowDestination<TInput> target, Predicate<TInput> rowsToKeep)
Parameters
TypeNameDescription
IDataFlowDestination<TInput>target
System.Predicate<T><TInput>rowsToKeep
Returns
TypeDescription
IDataFlowSource<TInput>

The linked component.

Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.LinkTo(ETLBox.DataFlow.IDataFlowDestination<TInput>, System.Predicate<TInput>)

LinkTo(IDataFlowDestination<TInput>)

Links the current block to another transformation or destination. Every component should be linked to only one component without predicates If you want to link multiple targets, either use predicates or a Multicast

Declaration
    public override IDataFlowSource<TInput> LinkTo(IDataFlowDestination<TInput> target)
Parameters
TypeNameDescription
IDataFlowDestination<TInput>target
Returns
TypeDescription
IDataFlowSource<TInput>

The linked component.

Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.LinkTo(ETLBox.DataFlow.IDataFlowDestination<TInput>)

LinkTo<TConvert>(IDataFlowDestination<TInput>, Predicate<TInput>, Predicate<TInput>)

Links the current block to another transformation or destination with a predicate for rows that you want to keep and a second predicate for rows you want to discard.

Declaration
    public override IDataFlowSource<TConvert> LinkTo<TConvert>(IDataFlowDestination<TInput> target, Predicate<TInput> rowsToKeep, Predicate<TInput> rowsIntoVoid)
Parameters
TypeNameDescription
IDataFlowDestination<TInput>target
System.Predicate<T><TInput>rowsToKeep
System.Predicate<T><TInput>rowsIntoVoid
Returns
TypeDescription
IDataFlowSource<TConvert>

The linked component.

Type Parameters
NameDescription
TConvert

Will convert the output type of the linked component.

Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.LinkTo<TConvert>(ETLBox.DataFlow.IDataFlowDestination<TInput>, System.Predicate<TInput>, System.Predicate<TInput>)

LinkTo<TConvert>(IDataFlowDestination<TInput>, Predicate<TInput>)

Links the current block to another transformation or destination with a predicate. Every component can be linked to one or more component. If you link multiple components, provide a System.Predicate<T> that describe which row is send to which target. Make sure that all rows will be send to a target - use the VoidDestination if you want to discarded rows.

Declaration
    public override IDataFlowSource<TConvert> LinkTo<TConvert>(IDataFlowDestination<TInput> target, Predicate<TInput> rowsToKeep)
Parameters
TypeNameDescription
IDataFlowDestination<TInput>target
System.Predicate<T><TInput>rowsToKeep
Returns
TypeDescription
IDataFlowSource<TConvert>

The linked component.

Type Parameters
NameDescription
TConvert

Will convert the output type of the linked component.

Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.LinkTo<TConvert>(ETLBox.DataFlow.IDataFlowDestination<TInput>, System.Predicate<TInput>)

LinkTo<TConvert>(IDataFlowDestination<TInput>)

Links the current block to another transformation or destination. Every component should be linked to only one component without predicates If you want to link multiple targets, either use predicates or a Multicast

Declaration
    public override IDataFlowSource<TConvert> LinkTo<TConvert>(IDataFlowDestination<TInput> target)
Parameters
TypeNameDescription
IDataFlowDestination<TInput>target
Returns
TypeDescription
IDataFlowSource<TConvert>

The linked component.

Type Parameters
NameDescription
TConvert

Will convert the output type of the linked component.

Overrides
ETLBox.DataFlow.DataFlowSource<TInput>.LinkTo<TConvert>(ETLBox.DataFlow.IDataFlowDestination<TInput>)

Implements