FME Transformers: 2025.0
FME Transformers: 2025.0
AttributeFilter
Routes features to different output ports depending on the value of an attribute. The set of possible attribute values can be entered manually, or extracted from an input source in the properties dialog.
Typical Uses
- Separating features based on attribute values for further individual processing
- Extracting one or more groups of features from a dataset based on attribute values
- Selecting features from a dataset that match specific values and discarding the rest
- Grooming a dataset by keeping select features and discarding features with non-matching, empty, missing, and/or null values
How does it work?
Once connected, the AttributeFilter lets you select an attribute to filter incoming features by. By default, Empty, Missing, Null, and Unfiltered outputs are provided, and you can specify additional values to filter by either entering them manually or importing values from an existing dataset.
All features are passed through the transformer, exiting via the appropriate output port.
Cached Values and Data-Aware Attributes
If Feature Caching is enabled, available attribute values from upstream features may be viewed and selected through the Import > From Feature Cache... option.
Examples

In this beginning of a workspace, a CAD file containing road data is read, and the features divided into separate streams for further processing based on the autocad_layer attribute value.
The transformer has been connected to the incoming features from the Reader, and so the dataset’s attributes are available for selection. The autocad_layer attribute is chosen.
The desired values are entered, each on a separate row. The available values could also be determined by using the Import button to scan the contents of the dataset.
Usage Notes
- Ideally, you will want to keep the filter list fairly small; otherwise you can end up with a very long list of attributes. If FME determines that the list might be too large, it will return a warning.
- If feature filtering can be done with groups or ranges of values, consider using the TestFilter or AttributeRangeFilter.
- If you are filtering features for the sole purpose of writing to separate layers or datasets, consider using Fanout instead.
- Feature ordering may be specified with the Advanced > Preserve Feature Order parameter.
Configuration
Input Ports

This transformer accepts any feature.
Output Ports

<Empty> |
If the feature’s attribute value is an empty string, the feature is output via the <Empty> port. |
<Missing> |
If the feature does not have the specified attribute, it is output via the <Missing> port. |
<Null> |
If the feature’s attribute has a value of null, the feature is output via the <Null> port. |
<Unfiltered> |
If the feature’s attribute has a value not in the list, the feature is output via the <Unfiltered> port. This port can be used for collecting all features with "positive" values, that is, values that are not missing, null, or empty. |

For each value entered in the Possible Attribute Values list, an output port is created with the same name as the value.
Parameters

Attribute to Filter by |
When you connect the transformer to the feature type, the list of attributes will appear in a pull-down list. Choose the attribute from the list. |

If you know the values you wish to filter, enter them individually here, one per row. Each entry will create an output port.
You may also import values from a source dataset by using the Import button.

Preserve Feature Order |
This parameter controls the order in which features exit a transformer. When a transformer has more than one output port, features usually exit one port at a time. At times, it may be useful to keep the order that features arrived in, switching from port to port as necessary. This allows feature order to be preserved, though at a potential cost in processing efficiency. Select a method for feature ordering.
|
Editing Transformer Parameters
Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

Defining Values
There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters.
Using the Text Editor
The Text Editor provides a convenient way to construct text strings (including regular expressions) from various data sources, such as attributes, parameters, and constants, where the result is used directly inside a parameter.
Using the Arithmetic Editor
The Arithmetic Editor provides a convenient way to construct math expressions from various data sources, such as attributes, parameters, and feature functions, where the result is used directly inside a parameter.
Conditional Values
Set values depending on one or more test conditions that either pass or fail.
Parameter Condition Definition Dialog
Content
Expressions and strings can include a number of functions, characters, parameters, and more.
When setting values - whether entered directly in a parameter or constructed using one of the editors - strings and expressions containing String, Math, Date/Time or FME Feature Functions will have those functions evaluated. Therefore, the names of these functions (in the form @<function_name>) should not be used as literal string values.

These functions manipulate and format strings. | |
Special Characters |
A set of control characters is available in the Text Editor. |
Math functions are available in both editors. | |
Date/Time Functions | Date and time functions are available in the Text Editor. |
These operators are available in the Arithmetic Editor. | |
These return primarily feature-specific values. | |
FME and workspace-specific parameters may be used. | |
Creating and Modifying User Parameters | Create your own editable parameters. |

Table Tools
Transformers with table-style parameters have additional tools for populating and manipulating values.
Row Reordering
|
Enabled once you have clicked on a row item. Choices include:
|
Cut, Copy, and Paste
|
Enabled once you have clicked on a row item. Choices include:
Cut, copy, and paste may be used within a transformer, or between transformers. |
Filter
|
Start typing a string, and the matrix will only display rows matching those characters. Searches all columns. This only affects the display of attributes within the transformer - it does not alter which attributes are output. |
Import
|
Import populates the table with a set of new attributes read from a dataset. Specific application varies between transformers. |
Reset/Refresh
|
Generally resets the table to its initial state, and may provide additional options to remove invalid entries. Behavior varies between transformers. |
Note: Not all tools are available in all transformers.
For more information, see Transformer Parameter Menu Options.
Reference
Processing Behavior |
|
Feature Holding |
No |
Dependencies | None |
Aliases | |
History |
FME Community
The FME Community has a wealth of FME knowledge with over 20,000 active members worldwide. Get help with FME, share knowledge, and connect with users globally.
Search for all results about the AttributeFilter on the FME Community.
Examples may contain information licensed under the Open Government Licence – Vancouver, Open Government Licence - British Columbia, and/or Open Government Licence – Canada.