You are here: Database > FeatureMerger

FeatureMerger

Copies and merges the attributes/geometry from one feature (or multiple features) onto another feature (or multiple features). Features that contain the desired attributes/geometry are connected through the Supplier port, and the features that will receive the attributes/geometry are connected through the Requestor port.

When a Requestor finds a Supplier, the attributes from the Supplier are merged with the Requestor. If the Requestor already had an attribute that the Supplier also had, the Requestor's original value for that attribute can be preserved or overridden, depending on parameter settings. A single Supplier may be used by many Requestors. Many Suppliers can be merged onto a single Requestor.

Any merged geometry preserves arcs, ellipses and text.

When attribute names conflict, you can choose whether Requestor or Supplier attribute values are maintained by using the Conflict Resolution parameter, and whether null values follow the same behavior by using the Ignore Nulls parameter.

Note: Version Notes: In FME 2013 and prior, Requestor attributes were always more dominant than Supplier attributes when they were merged, except for null attribute values (represented by missing attribute values), which were always less dominant.

Note: In FME 2014, Requestor attributes were always more dominant than Supplier attributes when they were merged, inclusive of null attribute values (null support was added in FME 2014). To make null values less dominant, the recommendation was to remove null values with the NullAttributeMapper.

Note: In FME 2015 and later, the user can now choose whether Requestor or Supplier attributes should be more dominant through the parameter Conflict Resolution. The user can now also choose whether null values are as dominant as other attribute values through the parameter Ignore Nulls.

Requestor features match Supplier features when every pair of keys (which support expressions) specified in the Join On table has the same value for both the Requestor and Supplier features.

Input Ports

Output Ports

Parameters

Transformer

Join On

Merge Parameters

Attribute Accumulation

If attributes on the supplier and requestor feature share the same name, but are not geometry attributes that start with fme_, then they are deemed conflicted.

Generate List

Usage Notes

Relationship to InlineQuerier

The InlineQuerier is the powerful cousin of the FeatureMerger. Whereas the FeatureMerger joins two datasets and uses a simple, single attribute key to match features, the InlineQuerier allows any number of input datasets to be merged, using the full power of SQL across any number of tables and columns. Furthermore, the InlineQuerier allows its input data to be reused multiple times in a single transformer, whereas if multiple joins are to be done with a FeatureMerger, multiple FeatureMergers must be employed and copies of the features sent to each. On the other hand, there is some overhead for the InlineQuerier to load the underlying SQLite database. Using a single InlineQuerier instead of several FeatureMergers also simplifies the workspace.

Unless only a single FeatureMerger is needed in a workflow, the InlineQuerier may be a better choice. Older workspaces with multiple cascading FeatureMergers may experience a performance improvement by replacing the FeatureMergers with a single properly configured InlineQuerier.

Relationship to SQLCreator/SQLExecutor

If all the data to be queried already exists in a SQL-capable data source, it is always more efficient to use the SQLCreator or SQLExecutor, because this allows the queries and filtering of the data to be executed directly by the database before it enters the FME environment.

Relationship to Joiner

The Joiner merges input features to features from a single other source. Since more than one connection can be made to the FeatureMerger’s Supplier port, Suppliers could come from different sources and have different attribution, and by setting Process Duplicate Suppliers to Yes, the FeatureMerger can essentially be used to perform a multiple table join.

The FeatureMerger is also able to perform certain geometric operations on incoming features using its Merge Type parameter. FeatureMerger does all joins in memory so it can be faster than the Joiner if you have more than one relationship on the same data.

Relationship to ListBasedFeatureMerger

The ListBasedFeatureMerger is a specified use case of the FeatureMerger. It should be used if you want to join on a list attribute of the Requestor.

Relationship to Matcher

Matcher, via its SingleMatched output port, is capable of doing multi-feature merging with geometry as the key. This complements FeatureMerger, which only accepts attributes, and not geometries, as keys.

Example

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.

Transformer Categories

Collectors

Database

 

Search FME Knowledge Center

Search for samples and information about this transformer on the FME Knowledge Center.

Tags Keywords: concatenated foreign key tag cross-reference "cross reference" FeatureMerger ReferenceResolver