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.
Implements
Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
public class FilterTransformation<TInput> : DataFlowTransformation<TInput, TInput>, IDataFlowLogging, IDataFlowTransformation<TInput, TInput>, IDataFlowSource<TInput>, IDataFlowSource, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, ILoggableTask
Type Parameters
Name | Description |
---|---|
TInput | The type of ingoing data. |
Constructors
FilterTransformation()
Declaration
public FilterTransformation()
FilterTransformation(Predicate<TInput>)
Declaration
public FilterTransformation(Predicate<TInput> filterPredicate)
Parameters
Type | Name | Description |
---|---|---|
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
Type | Description |
---|---|
Predicate<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
Type | Description |
---|---|
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
Type | Description |
---|---|
ITargetBlock<TInput> |
Overrides
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|---|---|
Exception | e |
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
Type | Name | Description |
---|---|---|
IDataFlowDestination<TInput> | target | Transformation or destination that the block is linked to. |
Returns
Type | Description |
---|---|
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
Type | Name | Description |
---|---|---|
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
Type | Description |
---|---|
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
Type | Name | Description |
---|---|---|
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
Type | Description |
---|---|
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
Type | Name | Description |
---|---|---|
IDataFlowDestination<TInput> | target | Transformation or destination that the block is linked to. |
Returns
Type | Description |
---|---|
IDataFlowSource<TConvert> | The linked component. |
Type Parameters
Name | Description |
---|---|
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
Type | Name | Description |
---|---|---|
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
Type | Description |
---|---|
IDataFlowSource<TConvert> | The linked component. |
Type Parameters
Name | Description |
---|---|
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
Type | Name | Description |
---|---|---|
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
Type | Description |
---|---|
IDataFlowSource<TConvert> | The linked component. |
Type Parameters
Name | Description |
---|---|
TConvert | Will convert the output type of the linked component. |