Key Parameter Types

There are multiple types of parameter, mainly related to the data type required; for example integer, float, string. However, two key parameter types for a self-serve setup are "Choice with Alias" and "Scripted".


Choice with Alias

A Choice parameter is where a user is presented with a list of choices and their selected is returned directly to FME. A Choice with Alias parameter is the same thing - the user is presented with a choice - but this time a different value is returned to FME based on a lookup table.

For example, here the author wishes the user to select the height of labels to be created in the output dataset:

The user is presented with the list of (more intuitive) options on the left, but the value returned to FME will be the (more useful) number on the right.

On FME Server this parameter type is very useful for Data Download tasks. That's because many of the values we want to pass to FME - for example format or coordinate system names - have an abbreviated format that wouldn't make sense if presented to the user. A Choice with Alias parameter allows us to provide a user-friendly list of options that hides a more complex response to the server.


Scripted

Scripted parameters are a way to generate a parameter value using a Python or Tcl script.

For example, setting the size of labels in an output dataset might be a bit more complex than just a single number. It may involve calculations related to the type of feature being labelled, the scale of any map being produced, the coordinate system used, and many other factors.

In that case a scripted parameter could be used to calculate the required value in a Python script and return it to FME as a user parameter.

Most importantly, a scripted parameter can include references to other user parameters; for example the scale of the map being produced might be selected by the user in a choice parameter, and label height calculated using that as one of the factors.

On FME Server this is again very useful for Data Downloads. This time it's because some values we want to return - for example a list of feature types - need to be constructed from a number of inputs. A scripted parameter allows us to accept input from the user and incorporate that into a script that constructs the actual, more complex, response to the server.


Miss Vector says...
How well do you know the types of FME published parameters? Decide which of the following are real parameters, and which are fake.

1. Color
2. Double
3. Password
4. Text (Multiline)

results matching ""

    No results matching ""