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.
ExtFilter filters input records according to the specified condition.
Component | Same input metadata | Sorted inputs | Inputs | Outputs | Java | CTL |
---|---|---|---|---|---|---|
ExtFilter | - | no | 1 | 1-2 | - | - |
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.
Port type | Number | Required | Description | Metadata |
---|---|---|---|---|
Input | 0 | yes | For input data records | Any |
Output | 0 | yes | For allowed data records | Input 01) |
1 | no | For rejected data records | Input 01) |
Legend:
1): Metadata can be propagated through this component. All output metadata must be the same.
Attribute | Req | Description | Possible 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. |
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 | |
---|---|
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 | |
---|---|
You can use either CTL1, or CTL2 in Filter Editor. The following two options are equivalent:
|