Configuring a Transformer
The configuration window of a newly-created transformer provides a template of ports, parameters, and parameter group boxes to help you get started.
Left Pane: Ports and Metadata
The left pane of the configuration window lists the transformer name and the Input and Output ports of the transformer.
Editing Metadata and Adding Developer Comments
When you click on the Transformer name, you can perform the following in the Configuration pane (by default, this pane is to the far right):
- Edit the Alternate Names and Categories of the transformer.
- Add Developer Comments about the transformer and its design for internal reference. To use features such as syntax highlighting, search, and display preferences, click Options.
Note: Developer comments pertaining to a specific version of the transformer can be added separately in the Version Information window.
Specifying Ports
To add a port, click Port on the toolbar, and select Input or Output. In the Configuration pane (far right, by default), specify the following:
- Execution Instance Identifier: The name in the execution instructions that are generated for a particular instance of the transformer. These instructions are generated by replacing the Execution Template Identifier in the execution instruction template with the Execution Instance Identifier specified.
- Execution Template Identifier (Input only): The name used in the execution template to refer to the port.
- Display Name: The name of the port displayed on the FME Workbench canvas. If not specified, the camel-case version of Execution Instance Identifier is used. If Execution Instance Identifier is not specified, the port arrow attaches directly to the transformer name banner, which is not explicitly displayed as a separate element in FME Workbench.
- Description (optional): A description of the port that displays in the tooltip in FME Workbench. If not specified, the tooltip displays Display Name.
- Attributes to Add (Output only): If the port outputs any additional attributes, add the attribute Name and Type.
- Preserve Attributes (Output only): Specifies the incoming attributes that the port outputs. If not specified, the port outputs all attributes. To add attributes, click under Inputs, and click the ellipsis (...) to select Attributes. Under Preserve, click the checkbox corresponding to each attribute you want to preserve. Or check Preserve to preserve all attributes. Optionally, under Prefix, specify a prefix to prepend to the attribute name.
To edit a port, select it and perform edits in the Configuration pane (far right, by default).
To change port order otherwise, select a port and click Up, Down, Top, or Bottom on the toolbar. These selections are also available from the Edit menu. Note that Input ports always list before Output ports.
To remove a port, select it and click Delete on the Toolbar or from the Edit menu.
Tip: From the toolbar or Edit menu, you can Cut, Copy, and Paste ports.
Middle Pane: Transformer Parameters
The middle pane of the configuration window lists the parameters of the transformer as they display in the transformer parameters dialog in FME Workbench.
To add a parameter, click Parameter on the toolbar or Add Parameter from the Edit menu, and specify the parameter type.
Parameter Type | Creates a Parameter to... |
---|---|
Choice | Choose one or more values. |
Color | Select a color value. |
Datetime | Enter a date and time. For information about output formats, see Standard FME Date/Time Format. |
File/URL | Choose the names and paths of existing files or folders, an output file or folder, or a URL. |
Message | Display a message at runtime. |
Number | Enter an integer or floating-point number. The number can be bounded or unbounded based on the specified Configuration. |
Password | Enter a password. |
Text | Enter a text string. |
Yes/No | Select or unselect a checkbox. |
Attribute Name | Choose names of feature type attributes, or items from a comma-delimited or space-delimited attribute list. Choices populate based on the attributes incoming to the transformer. |
Coordinate System | Choose a coordinate system. |
Database Connection | Choose a database connection. |
Geometry | Enter a geometry as a set of spatial coordinates in GeoJSON. When a workspace containing a Geometry published parameter is run from FME Flow, an interface is available for displaying the specified coordinates on a map and specifying the desired geometry. For more information, see Using the Geometry Parameter in FME Flow. |
Reprojection File | Choose a grid shift file for reprojecting data. |
Web Connection | Choose a web connection. |
Scripted | Write a Python or Tcl script that assigns the value of a parameter to the workspace at runtime. |
To add a group box in which to arrange parameters, select Group Box. Click and drag other parameters into the group box as desired.
To configure the properties of a parameter or group box, select it in the middle pane, and configure in the Configuration pane (far right, by default).
Configuring Parameter Properties
A short, unique name for the parameter. This name is used to reference the parameter in values (for example, $(myIdentifier)) and menus.
The label that displays for the parameter in the parameters dialog of the transformer in FME Workbench.
Note: In some configurations, Prompt is not available; for example, when parameter type is Text and Display is Embedded Multiline Editor. As an alternative, place the parameter inside a group box, and set the group box Prompt as the parameter prompt.
- Literal: The parameter accepts only a literal value. It cannot be assigned a value from a published parameter.
- User Parameter Support: The parameter accepts a literal value or a value assigned from a user parameter.
- Full Expression Support: The parameter accepts a literal value, a value assigned from a user parameter, an expression (for example, using the @Value() FME Feature Function), or a combination.
If checked, the parameter displays in the parameters dialog for the transformer in FME Workbench. If unchecked, the parameter neither displays nor is available to the end user.
If checked, the parameter requires the FME Workbench user to input a value for the parameter in the parameters dialog of the transformer. If unchecked, an input value is not required for the parameter.
The parameters required in this field depend on the parameter type you choose.
You can populate the choices to display in a Dropdown, List, or Tree.
Tip: Limit Dropdown to a single selection from a small number of choices. To allow selecting from a large number of choices, use List, and check or uncheck Allow Multiple Selection accordingly.
If Tree is selected, specify a Tree Node Delimiter for the nodes of the tree. Then specify the Choices, using the delimiter to indicate under which node to place the value.
For example, this configuration uses a comma to delimit building choices by building site:
Mouse-over to view:
When the parameter displays, the choices appear like this:
Mouse-over to view:
- Path Selection:
- Multiple Paths: Allows for selecting multiple items.
- Single Path: Allows for selecting a single item.
- Existing Path: Allows for selecting a single item that must already exist on the system at runtime.
- Specify Extension Filters: If checked, allows you to apply filters on the filenames that can be selected. Specify the filters in the Filter field, and an optional description in the Description field. Wildcard characters and logical operators are supported in the Filter field. For example, to allow any file with a .shp extension, specify *.shp. To add or remove filters, or move filters higher or lower in the list, click the add (+), remove (-), or directional arrow symbols. To specify more than one condition in the same filter, use the OR operator; for example, *.shp OR *.dbf. To allow any file to be selected, leave this field blank.
- Restrict URL Schemes: If Items to Select is URL, check this box to specify the URL protocols that are allowed. http and https are listed by default. To specify other protocols, double-click inside an empty row, type the protocol, and press enter. To add or remove protocols, select and click + or -, respectively.
- Select Single: Allows selecting a single attribute name from a drop-down.
- Select Multiple: Allows selecting multiple attribute names from a list box.
- List Support:
- None: Allows selecting names of both regular attributes and list attributes. However, if a list attribute name is selected, the user is prompted further to select a list element name. Specify this option if the transformer implementation does not support list attributes.
- Full: Allows selecting names of both regular attributes and list attributes. Specify this option if the transformer implementation supports list attributes.
- Exclusive: Allows selecting only list attribute names. Specify this option to restrict selection only to list attributes, and the transformer implementation supports list attributes.
- Allow New Attributes: If Select Single is specified, this option allows the user to specify a new attribute name instead of selecting an existing attribute.
- Exclude Incoming: If checked, the user is prevented from selecting names of format and user attributes that originate from any reader feature types.
- Format Attributes:
- None: The user is prevented from selecting any format attribute names.
- Upstream Reader: The user can select format attribute names defined only on reader feature types in the workspace.
- Downstream Writer: The user can select format attribute names defined only on writer feature types in the workspace.
- Both: The user can select format attribute names defined on both reader and writer feature types in the workspace.
- User Attributes:
- None: The user is prevented from selecting names of any user attributes.
- Upstream Reader: The user can select names of user attributes defined only on reader feature types in the workspace.
- Downstream Writer: The user can select names of user attributes defined only on writer feature types in the workspace.
- Both: The user can select names of user attributes defined on both reader and writer feature types in the workspace.
- Filter Attributes By Port: Restricts the selection of attributes to those that enter the specified port.
You can configure the following parameters if Geometry Encoding is GeoJSON:
- Geometry Types: The geometries that may be specified. If the coordinates that are entered do not validate to any of the specified geometries, an error is returned.
- Specify initial bounds for map display: If checked, the interface for entering coordinates is limited to the specified Top, Left, Bottom, and Right coordinates.
If Published is checked, this setting controls the visibility of the parameter based on the values of Choice parameters that are provided at runtime prior to this parameter.
The visibility of the parameter depends on whether the value of the Choice parameter specified in the If clause Is or Is Not the specified value. Depending on the results of the If clause, the visibility of the parameter is controlled in the Then and Else clauses as either enabled (Show as Enabled), disabled (Show as Disabled) or hidden (Hide).
For more information, see Controlling the Visibility of Published Parameters.
Choose the default value that will be used.
Other Operations on Transformer Parameters
You can change the order of the parameters (except Transformer Name) as they appear individually, within group boxes, or the group boxes themselves. Select the parameter or group box, and click and drag to the desired order. Alternatively, click Up, Down, Top, or Bottom on the toolbar, or from the Edit menu.
To remove a parameter or entire group box, select it and click Delete on the Toolbar or from the Edit menu.
Tip: On the toolbar or from the Edit menu, you can Cut, Copy, and Paste parameters.