Learning Objectives

After completing this unit, you’ll be able to:

Note

Learning content in the FME Academy presents the story of a user addressing their data integration challenges with FME. You should follow along with their actions using your own installation of FME (2021.0 or later) or request an on-demand virtual machine in the footer link below. Some units will require you to follow their steps or to take additional steps on your own to answer a quiz question.

The Resources section will provide you with links to interactive tutorials and starting workspaces when necessary.

Resources

Video

Note

Videos are provided in this module if you prefer to watch instead of reading the text below. Note that some Quiz answers might require you to read the text.

Automate Repetitive Data Integration Tasks with FME Server

Frank

Frank is a GIS Administrator working with Jennifer for a local government. He is also the FME Server Administrator for his organization. Because his town doesn't have an open data portal, he is constantly bombarded with emails from other departments and the public asking for GIS data. He has to read through the emails, find out what layer people are requesting, and manually send it to them. People most often request layers from the community resources geodatabase, which contains data about street food vendors, parks, community centers, etc.

His colleague Jennifer offers to help him use FME Server to let users access the data directly without his help, creating self-serve data delivery.

Note

FME Server can automatically run workspaces on a schedule or in response to a trigger such as an email being received. It also lets you manage data securely and make data accessible to everyone in your organization.

Note

FME Server has five default security roles. You will need at least the fmeauthor role to follow along in this module.

Learn More.

Give Users Control Using Published Parameters

Jennifer sends Frank a workspace to help him get started. He downloads and opens it with FME Workbench. 

Note

Follow along with Frank's steps using your own version of FME.

It’s a simple workspace that reads in all the feature classes of an Esri geodatabase and then writes them out to the format of a user’s choice.

Starting workspace

Jennifer tells him he can create a workspace that gives end-users control over what data they get. She suggests two steps to let users customize the data they receive:

  1. Let them choose the format
  2. Let them choose the layers
Note

Jennifer’s advice raises an important point. Remember to design your workspaces based on the FME platform user roles. Frank has to design his workspace so it works well for end-users. These end-users might be running the workspace as a logged-in user of FME Server or might be using a public-facing FME Server App. The choices he provides need to make sense for these situations.

The first step is to let users specify which data format they want by providing them a fixed selection of format choices. Since the workspace uses a Generic writer, users are currently able to choose any format. This unlimited choice can lead to problems:

Jennifer tells Frank he can create user parameters to address this issue. User parameters give users control over how a workspace runs. You can use published parameters when running workspaces locally, but it is critical to use them when creating workspaces for FME Server, which are likely to be run by other people.

Note

User parameters can be published or private.

  • Published parameters are shown to the user when they run the workspace.
    Private parameters are used for setting a value once and using it in many places in a workspace. These are not shown to other users.

Define Which Formats Users Can Write To

To restrict the formats available for writing, Frank finds the Training [GENERIC] writer in the Navigator. He clicks the drop-down arrow and expands the Parameters section.

Viewing Reader parameters in the Navigator

He double-clicks the Output Format parameter and sees it’s currently assigned to “Esri Shapefile”.

Editing a User Parameter value

Back in the Navigator window, Frank sees that the output format is linked to a user parameter because it has a different icon and says “(Linked to ‘FORMAT_GENERIC’)”. Most parameters in a workspace – reader, writer, and transformer – can be linked to published parameters to let users set their value when they run the workspace.

Frank wants to see how the parameter works, so he clicks the Run menu and ensures Prompt for User Parameters is checked, and then clicks Run.

Ensuring Prompt for User Parameters is checked

The Translation Parameter Values dialog pops up and asks the user to select a value for Output Format, defaulting to “Esri Shapefile”. Frank clicks the drop-down menu for Output Format and sees he can pick any format supported by FME. That's too many options.

Output Format options

To fix this problem, Frank closes the dialog and looks at the User Parameters section of the Navigator. He finds the “[FORMAT_GENERIC]” published parameter. He will replace this to restrict the user’s options. He right-clicks it and selects Delete.

Deleting a user parameter

Then he right-clicks User Parameters and clicks Manage User Parameters...

Creating a user parameter

Note

Frank is deleting the existing user parameter and adding a new one because some user parameters that are created automatically cannot be edited fully. For those, it’s better to start fresh.

The Parameter Manager dialog opens. There are many types of user parameters available. In this case, Frank chooses Choice, which lets him provide a list of options to the user that map onto a different value provided to the workspace. This user parameter is useful for letting users choose formats or coordinate systems because it hides the more complex name FME needs and instead shows a simple version to the user.

Editing a user parameter

On the right-hand side Frank fills out the dialog with the following parameter properties:

Parameter Identifier
OutputFormat
Prompt
Enter an output format
Published
Enabled
Required
Disabled
Disable Attribute Assignment
Enabled
Choice Configuration
Drop-down

Then for Choices Franks enters the following:

Value
Display
ACAD Autodesk AutoCAD DWG/DXF
CSV2 CSV (Comma-Separated Value)
GEOJSON GeoJSON (Geographic JavaScript Object Notation)
MITAB
MapInfo TAB
SHAPEFILE
Esri Shapfile
XLSXW
Microsoft Excel

Then Frank selects Esri Shapefile as the default value.

Setting up parameter

He clicks OK to create the published parameter.

Now that he has created a published parameter, he needs to link it to the correct writer parameter for it to work. He goes back to the writer’s Output Format parameter, right-clicks it, and clicks Link to User Parameter.

Linking a parameter to a user parameter

In the Set to User Parameter dialog, he picks OutputFormat from the list and clicks OK.

Selecting a user parameter to link

Now when he clicks Run, he is prompted to choose an output format from the restricted list. The workspace runs and he receives the data in the format he chose.

Viewing the restricted list of formats

Exercise

Frank is happy with the format selection, but now he’d like to let the user pick the layers from the geodatabase they receive. He knows he can control this with the user parameter Feature Types to Read, found in the Navigator under CommunityMap [FILEGDB] reader > Parameters > Features to Read.

For the exercise, create a new published parameter that lets the user pick which feature types to read and write. Hint: in some cases, creating a published parameter is as easy as right-clicking the parameter you want to link and selecting Create User Parameter.