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 Input 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 Input 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 Input and Output 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 Output Value, which may be left blank.

Additional Value Settings

Default Output Value, Input Value, and Output Value can be set to a fixed value, or can use an FME predefined value. In the case of Input and Output 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

Input Value: Input null values will be mapped to a output value.

Output Value: The source value will be mapped to a null output value.

The reverse is true if Mapping Direction is set to Reverse (Output to Input).

No Action

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

Otherwise, no output attribute will be created for the input value specified.

Support for Null, Missing, and Empty String Values

When mapping from input to output, there are three attribute values that are not supported by the Default Output 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
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.