Question

What is a Custom Transformer?

Answer

Definition

A custom transformer is a sequence of standard transformers condensed into a single transformer. Any existing sequence of transformers can be turned into a custom transformer; you get the same data flow as the original transformers, and the custom transformer can be edited just like any workspace.

Usage

Custom transformers help to:
  • tidy a busy workspace by moving large content onto sub-pages of the canvas.
  • efficiently reuse the same sequence of transformers in a number of places.
User-added imageUser-added image

Above: a series of existing transformers is reduced to a single custom transformer, enabling the original sequence to be used in multiple locations with the minimum effort.

Best Practice

Custom transformers are an example of Best Practice because of the way they reduce clutter and enable reuse of components. Another method of reducing transformer duplication is to use a FeatureTypeFilter transformer.

Forms

Custom transformers come in two forms: embedded and linked
  • Embedded custom transformers are those whose definition is contained within a workspace. The custom transformer can be used within that workspace, but no-where else. Embedded transformers are coloured green within the workspace.
  • Linked custom transformers are those whose definition is contained within a separate .fmx file. Such a file enables the transformer to be used in multiple workspaces; for example by emailing them to other FME users, or by placing them in a shared directory. Linked transformers are coloured cyan within the workspace.

Looping

Custom transformers support looping.

Examples

Search fmepedia for all the Custom Transformers which have been submitted by FME Users.