Skip to content

Latest commit

 

History

History
41 lines (20 loc) · 3.02 KB

4.08.UnexpectedInputRemover.md

File metadata and controls

41 lines (20 loc) · 3.02 KB

The Unexpected Input Remover

Every time FME reads a dataset, it checks the feature types inside that dataset to ensure that they are all defined within the workspace schema. If there are feature types that exist in the dataset, but do not exist in the workspace, then features are classed as unknown and filtered out by a function called the Unexpected Input Remover.

The actions of the Unexpected Input Remover are reported in the Log file and through a dialog that opens at the end of a translation.

Recheck the Unexpected Input dialog from the previous example. FME dropped a number of features from the translation because their feature type was unknown in the workspace.

Notice how each feature type mentioned is listed along with a count of the affected features.

Also notice the checkbox that allows this report to be turned off in future translations.

Remember, the feature types in a dataset do not necessarily match those defined in the workspace. For example, a user may have purposely left a feature type out of a workspace when it was generated, or may have decided a feature type was no longer required and so deleted it.

In that scenario, the Unexpected Input dialog may still pop up, but can be safely ignored as the user deliberately requires this behaviour.

Therefore this dialog is considered a reminder rather than an error, and is not always an indication something has gone wrong.

Unexpected Input and Dataset Type

Remember, in general terms, there are two different types of dataset: file-based and folder-based. Just as they are read slightly differently, the Unexpected Input Remover operates on them in the same way.

File-Based

File-based datasets are the easiest to understand. If there is a layer in the file that is not represented on the canvas then FME treats the data as "unexpected" and the Unexpected Input Remover will drop it from the translation.

For example, if I set up my translation to read the layers Roads, Rail, and Rivers, then a new layer of data is added to the source dataset (or I switch the dataset to a different one) then new layers - like Vegetation, Buildings, etc - will be dropped.

Folder-Based

Folder-based datasets are when the layers are stored as separate files in a folder; for example a Shape dataset with multiple shp files.

In this case, if I have set up a translation to read one Shape file, then change it to read a different one, then the data is unexpected - because it is a different layer, one not represented by a feature type. This is the exact scenario in the previous example.

In fact, this most often becomes a problem when a set of tiled datasets are being read, as each tile is a separate file (feature type) and needs a separate definition if it is to be allowed into the translation.