AttributeValueMapper

Compares attribute values to a lookup table and assigns new values where matches are found. Mapped values may be stored in a new attribute, or overwrite an existing attribute, including the original source.

Jump to Configuration

Typical Uses

  • Adding or altering attribute values based on a user-defined lookup table
  • Cleaning up attribute values
  • Creating alternative, coded values for attributes

How does it work?

The AttributeValueMapper is driven by a user-defined lookup table - the Value Map. One source attribute is selected, which will have its values compared to the lookup table to map new values. The new values may be stored in a new attribute (default behavior), or can overwrite an existing attribute (including the Source Attribute).

The Value Map can either be created manually or by importing any FME-supported dataset. Importing is particularly useful for using a predefined map that already contains the Source and Destination Values (such as a spreadsheet), and for scanning a dataset to find all existing values for a given attribute.

If an attribute value is not found in the Value Map, the new attribute will be assigned the Default Value, which may be left blank.

Additional Value Settings

Default Value, Source Value, and Destination Value can be set to a fixed value, or can use an FME predefined value. In the case of Source and Destination values, these may be set per line in the Value Map table, and so different attribute values may prompt different actions.

Values available are:

Null

Source Value: Source null values will be mapped to a destination value.

Destination Value: The source value will be mapped to a null destination value.

The reverse is true if Mapping Direction is set to Reverse (Destination to Source).

Do Nothing

No action will be taken. When mapping in-place (that is, if the new value is overwriting the source value), the source attribute value will be preserved.

Otherwise, no destination attribute will be created for the source value specified.

Stop Translation If the specified source value is encountered, halt translation with the specified message. Useful when you wish to halt translation on unexpected attribute values, such as null values.

Support for Null, Missing, and Empty String Values

When mapping from source to destination, there are three attribute values that are not supported by the Default Value parameter or the Value Map table. They are: missing, null, and empty string values. The exceptions are noted below.

It is possible to map or specify a default value of null by using the null constant, available on the parameter drop-down menu.

Further, it is possible to map a source value to a destination value of empty string, or to specify the empty string as the default value.

Note that if a missing or null value is specified as a destination value or default value via an attribute, it will be converted into an empty string.

Examples

Usage Notes

  • if you need to map to or from null, missing, or empty string values, consider using NullAttributeMapper.

Configuration

Input Ports

Output Ports

Parameters

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.

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. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.

Dialog Options - Tables

Transformers with table-style parameters have additional tools for populating and manipulating values.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies None
FME Licensing Level FME Base Edition and above
Aliases ValueMapper
History Previously named ValueMapper

FME Community

The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

Search for all results about the AttributeValueMapper on the FME Community.

 

Examples may contain information licensed under the Open Government Licence – Vancouver and/or the Open Government Licence – Canada.