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
Implements
Inherited Members
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
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 |
---|---|---|
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
Type | Description |
---|---|
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
Type | Description |
---|---|
System.Threading.Tasks.Dataflow.ISourceBlock<TOutput><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 |
---|---|
System.Threading.Tasks.Dataflow.ITargetBlock<TInput><TInput> |
Overrides
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
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()
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
Type | Name | Description |
---|---|---|
IDataFlowDestination<ETLBoxError> | target | The target for erroneous rows. |
Returns
Type | Description |
---|---|
IDataFlowSource<ETLBoxError> | 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 | |
System.Predicate<T><TInput> | rowsToKeep | |
System.Predicate<T><TInput> | rowsIntoVoid |
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 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
Type | Name | Description |
---|---|---|
IDataFlowDestination<TInput> | target | |
System.Predicate<T><TInput> | rowsToKeep |
Returns
Type | Description |
---|---|
IDataFlowSource<TInput> | The linked component. |
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 |
Returns
Type | Description |
---|---|
IDataFlowSource<TInput> | 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 | |
System.Predicate<T><TInput> | rowsToKeep | |
System.Predicate<T><TInput> | rowsIntoVoid |
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 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
Type | Name | Description |
---|---|---|
IDataFlowDestination<TInput> | target | |
System.Predicate<T><TInput> | rowsToKeep |
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>)
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 |
Returns
Type | Description |
---|---|
IDataFlowSource<TConvert> | The linked component. |
Type Parameters
Name | Description |
---|---|
TConvert | Will convert the output type of the linked component. |