You are here: FME Transformers > Database > FeatureReader

FeatureReader

Performs queries against any FME-supported format. The queries can have both a spatial and a nonspatial component.

One query is issued to the FME-supported format for each feature that enters the transformer. The results of the query are then output.

Input Parameters

Select the Reader format and dataset, including any reader-specific parameters

Query Operation

You can select feature types from the wizard parameters or from a chosen attribute.

If you want to select an existing attribute, click Query the feature types specified in the attribute below, then select from the list. The chosen attribute can contain multiple feature types (in a colon-separated list) to be queried. Feature types that do not match a selected feature type name will be output through the <OTHER> port.

Spatial Interaction

Advanced Options

Optional: To customize merge behavior and enable the feature cache, you can edit Advanced Options. Otherwise, click Finish to set the previous transformer parameters and close the wizard.

The INITIATOR feature defines the geometry that will be used to define the spatial component of the query, unless it does not contain any geometry. In this case, only an attribute query as defined by the WHERE clause will be executed.

Merge Behavior

By default, this transformer outputs only result attributes and geometry – it does not transfer the attributes and geometry of INITIATOR features. To change this behavior, select from Attribute Handling or Geometry Handling:

Attribute Handling
  • Keep result attributes only: The result feature attributes are based solely on the query results.
  • In case of conflict, keep INITIATOR attributes: The result feature attributes are a combination of both the query results and the INITIATOR feature's attributes. If there is a conflict, attribute values are taken from the query feature.
  • In case of conflict, keep result attributes: The result feature attributes are a combination of both the query results and INITIATOR feature's attributes. If there is a conflict, attribute values taken from the query results.
Geometry Handling
  • Keep result geometry only: The result feature geometry is taken from the query results.
  • In case of conflict, keep INITIATOR geometry: The result feature geometry is taken from the query feature.
  • In case of conflict, keep aggregate of INITIATOR and result geometry: The result feature geometry is an aggregate of the geometry from the query feature followed by the geometry from the query results.

Enable Cache

By default, this transformer will reread the original source data for each INITIATOR feature. To improve performance (for example, with web services, databases, or URLs), you can choose to create a preprocessed cache to improve the speed when rereading the original source data.

The cache will expire after the specified time interval, or if the original data file is modified.

Note that the Cache Timeout value is also a component of the preprocessed cache. This means that different values of Cache Timeout will correspond to different versions of the cached dataset. For example, if the FeatureReader is set with a Cache Timeout of 1 hour, then set a second time with the same dataset, but with a Cache Timeout of 2 hours, there will be two cached copies of this dataset.

Editing Transformer Parameters

About Transformer Parameter Options

Transformer Categories

Database

 

Search FMEpedia

Search for samples and information about this transformer on FMEpedia.

Keywords: query