You are here: Transforming Data > Custom Transformers > Using Custom Transformers

Using Custom Transformers

Custom transformers can simplify workspaces with large transformations. A large workspace that is broken down into smaller pieces is easier to manage.

Opening a Custom Transformer

Select File > Open, and browse to your FME > Transformers folder.

If you exported the custom transformer, you can also open it just like you would a regular workspace.

Including a Custom Transformer in a Workspace

You can choose a linked custom transformer from the Transformer Gallery.

Editing Custom Transformers

You can edit a custom transformer as needed in the same way as you would edit any workspace. Remember that the definition applies to all instances of the custom transformer: if the transformer is used multiple times, edits apply to every occurrence.

Nested custom transformers are permitted, so you can create one custom transformer inside another. This nesting can go on for a number of levels.

You can edit an embedded custom transformer (one that you previously exported) by clicking its tab at the top of the workspace window and editing the contents, or right-clicking on the custom transformer and choosing Edit from the command menu.

The changes are automatically applied within the main workspace, wherever the custom transformer is used.

Editing Input and Output Ports of Custom Transformers

You can edit the input and output ports of custom transformers by clicking on their respective properties buttons . The Edit Transformer dialog opens, where you can do the following:

  • Rename the port: Doing so also renames the port on the custom transformer in the main workspace, making it easier to understand which inputs and outputs should be connected.
  • Unpublish the port (input port): You can make the custom transformer unavailable to receive any external input outside its immediate context. For more information, see Disabling Published Input in the Looping Custom Transformers topic.
  • Expose external attributes (input port): You can expose any external attributes available to the custom transformer, which adds them as published parameters. The custom transformer must be published to expose attributes.
  • Specify any attributes to output (output port): In the Attributes to Output field, you can specify which attributes to output:
    • Specified Attributes Only: The port outputs only the attributes whose checkboxes are selected. Any attributes that are not selected are removed and are not available to subsequent custom transformers, workspaces or feature types.
    • All Attributes: The port outputs all of the attributes listed below the drop-down list.
    • In this example, only the _area attribute is output:

Tip: If you close a custom transformer tab, you can reopen it by right-clicking on the custom transformer in the main workspace and choosing Edit from the command menu.

Note: If you delete a custom transformer from the main workspace, you will have to recreate it. As long as its original tab is still open in the workspace, you can use its contents to create a new custom transformer. Choose Insert Custom Transformer from the main workspace, then copy and paste the contents of the original tab to the new tab. You can then close the original tab.

What else can you do with custom transformers?

See Also