FME Form: 2024.1
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 specify 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.
- Geometry To Add (Output only): If the port outputs any additional geometries, add the name of each geometry.
- Preserve Geometry (Output only): Specifies the incoming geometries that the port outputs. If not specified, the port outputs all geometries. To specify geometries, click under Inputs, and click the ellipsis (...) to select geometries. Under Preserve, click the checkbox corresponding to each geometry you want to preserve. Or check Preserve to preserve all geometries.
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.
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. |
Advanced > Scripted Selection | Access a callback method in a Python module that returns values available for selection and which may be obtained remotely, such as from a web service. Scripted selection parameters are useful in configuring *Connector transformers to access resources (for example, the Folder parameter of the GoogleDriveConnector transformer). For more information about using Python with scripted selection parameters, see the FME Packages SDK Guide. |
Advanced > Scripted Value | Write a Python 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.
- 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.
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.
- Python Entry Point: The name of the Python module that accesses resources. The Python package containing the module must be built and installed to FME. For more information, see the FME Packages SDK.
- Input Parameters: Parameter values required for the Python module to run; for example, the value from a user parameter of type Web Connection that was created to access a web service.
- Selection Type: Specifies the type of values available for selection:
- Items: Only files are available for selection.
- Containers: Only folders are available for selection.
- Items and Containers: Files and folders are available for selection.
- Allow Multiple Selection: If checked, more than one value can be selected.
- Items Have Hierarchy: If checked, the hierarchical path structure is preserved in the presentation of values that are selected.
- Allow Root Selection: If checked, the root folder of the resource being accessed is available for selection.
- Container Icon: In the selection dialog, the icon to display with containers.
- Item Icon: In the selection dialog, the icon to display with files.
- Supports Search: If checked, a Search field is added to the selection dialog.
- Name Matches Identifier: If checked, any names of resource values that match their identifiers are not editable in the Advanced Selection Editor. If unchecked, any names of resource values that match their identifiers are editable, while the names of resource values that do not match their identifiers are not editable.
- Input Constants: Any additional Key-Value data that may be required for the Python module.
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
To see a preview of how the transformer parameters would appear in the properties dialog of the transformer, click the Preview icon on the toolbar.
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.