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.
The feature type that contains the attributes you want to filter.
If the feature’s attribute value is an empty string, the feature is output via the <Empty> port.
If the feature does not have the specified attribute, it is output via the <Missing> port.
If the feature’s attribute has a value of null, the feature is output via the <Null> port.
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.
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 possible attribute values, you can type them here. If not, you can import them from a source dataset:
- Click the Import button to start the import wizard, and click Change Dataset.
- Choose the source dataset. Click Next.
- Choose the desired feature types. Click Next
- Select an attribute to be scanned for values. Click Next.
- FME will scan the dataset, and the processing summary will appear in the wizard. For example:
- Click Import to add the values to the AttributeFilter. The list will appear in the transformer properties dialog.
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.
You have a feature type called ROADS, and you know you have an attribute value called TYPE. You want to filter by TYPE (in this example, loose, paved, or rough). When you set up the transformer properties and click OK, you will see that the AttributeFilter now has new attributes that correspond to the filter settings:
The transformer will filter and, after you run the workspace, output the separate attributes.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.