ExtFilter

We assume that you have already learned what is described in:

If you want to find the right Transformer for your purposes, see Transformers Comparison.

Short Summary

ExtFilter filters input records according to the specified condition.

Component Same input metadata Sorted inputs Inputs Outputs Java CTL
ExtFilter-no11-2--

Abstract

ExtFilter receives data records through single input port, compares them with the specified filter expression and sends those that are in conformity with this expression to the first output port. Rejected records are sent to the optional second output port.

Icon

Ports

Port typeNumberRequiredDescriptionMetadata
Input0yesFor input data recordsAny
Output0yesFor allowed data recordsInput 01)
1noFor rejected data recordsInput 01)

Legend:

1): Metadata can be propagated through this component. All output metadata must be the same.

ExtFilter Attributes

AttributeReqDescriptionPossible values
Basic
Filter expression Expression according to which the records are filtered. Expressed as the sequence of individual expressions for individual input fields separated from each other by semicolon. 

Advanced Description

Filter Expression

When you select this component, you must specify the expression according to which the filtering should be performed (Filter expression). The filtering expression consists of some number of subexpressions connected with logical operators (logical and and logical or) and parentheses for expressing precedence. For these subexpressions there exists a set of functions that can be used and set of comparison operators (greater than, greater than or equal to, less than, less than or equal to, equal to, not equal to). The latter can be selected in the Filter editor dialog as the mathematical comparison signs (>, >=, <, <=, ==, !=) or also their textual abbreviations can be used (.gt., .ge., .lt., .le., .eq., .ne.). All of the record field values should be expressed by their port numbers preceded by dollar sign, dot and their names. For example, $0.employeeid.

[Note]Note

You can also use the Partition component as a filter instead of ExtFilter. With the Partition component you can define much more sofisticated filter expressions and distribute data records among more output ports.

Or you can use the Reformat component as a filter.

[Important]Important

You can use either CTL1, or CTL2 in Filter Editor.

The following two options are equivalent:

  1. For CTL1

    is_integer($0.field1)
  2. For CTL2

    //#CTL2
    isInteger($0.field1)