FilterTransformation<TInput>

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
DataFlowTransformation<TInput, TInput>
FilterTransformation<TInput>
Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public class FilterTransformation<TInput> : DataFlowTransformation<TInput, TInput>, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
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
Predicate<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
Predicate<TInput>

FilteredCount

Declaration
    public int FilteredCount { get; }
Property Value
TypeDescription
int

PassedCount

Declaration
    public int PassedCount { get; }
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

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

Transformation or destination that the block is linked to.

Returns
TypeDescription
IDataFlowSource<TInput>

The linked component.

Overrides

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 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

Transformation or destination that the block is linked to.

Predicate<TInput>rowsToKeep

Only rows that evaluate to true are send to the connected target

Returns
TypeDescription
IDataFlowSource<TInput>

The linked component.

Overrides

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

Transformation or destination that the block is linked to.

Predicate<TInput>rowsToKeep

Only rows that evaluate to true are send to the connected target

Predicate<TInput>rowsIntoVoid

Rows that are evaluate to true will be discarded

Returns
TypeDescription
IDataFlowSource<TInput>

The linked component.

Overrides

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

Transformation or destination that the block is linked to.

Returns
TypeDescription
IDataFlowSource<TConvert>

The linked component.

Type Parameters
NameDescription
TConvert

Will convert the output type of the linked component.

Overrides

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 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

Transformation or destination that the block is linked to.

Predicate<TInput>rowsToKeep

Predicate - only rows that evaluate to true are send to the connected target

Returns
TypeDescription
IDataFlowSource<TConvert>

The linked component.

Type Parameters
NameDescription
TConvert

Will convert the output type of the linked component.

Overrides

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

Transformation or destination that the block is linked to.

Predicate<TInput>rowsToKeep

Only rows that evaluate to true are send to the connected target

Predicate<TInput>rowsIntoVoid

Rows that are evaluate to true will be discarded

Returns
TypeDescription
IDataFlowSource<TConvert>

The linked component.

Type Parameters
NameDescription
TConvert

Will convert the output type of the linked component.

Overrides

Reset()

Declaration
    protected override void Reset()
Overrides

Implements