fmeobjects.FMETransformer

getParsedParamValue(paramName), |
|
isRequired(parameterName), |
|
setParameterValue(parameterName, parameterValue), |
|
setParameterValues(parameters), |
- class FMETransformer
FME Transformer Class
This class provides the ability to parse transformer parameters.
init(transformerName, fmePackageName, transformerVersion)
Creates a transformer object of the specified name. The transformer name must be fully qualified with its package name if it has one.
Warning
Instantiating this class on FME Flow requires FME 2024.0 (build 24145) or newer.
- Parameters:
transformerName (str) – The name of the transformer as specified by TRANSFORMER_NAME in the transformer’s definition.
fmePackageName (str) – (Optional) The FME package name of the transformer. If the transformer has a package name, including it greatly increases the performance of creating this transformer.
transformerVersion (int) – (Optional) The version of transformer definition to create. By default the latest version of the transformer is loaded.
- Return type:
- Returns:
An instance of a Transformer object.
- __init__(*args, **kwargs)
- getParsedParamValue()
getParsedParamValue(paramName),
Returns parsed parameter value for the specified parameter name. If the parameter value was not set on the transformer, then the default value is returned.
If the parameter value set on the transformer cannot be scoped to the required parameter type, then a
ValueErrorwill be raised. In such a case, the caller should reference the parameter value they set on the transformer for the original parameter value.- Parameters:
paramName (str) – Parameter name of value to retrieve.
- Return type:
bool, int, float, str, bytes, None, list[bool, int, float, str, bytes, None]
- Returns:
The parsed parameter value.
- Raises:
ValueError – Raised when the parameter value cannot be scoped to the required parameter type.
TypeError – Raised when the parameter value type is not supported.
KeyError – Raised when a parameter value does not exist for the parameter name.
- isRequired()
isRequired(parameterName),
Will return
Trueif parameter is required.Falseotherwise. If parameter is currently unused,Falsewill be returned.
- setParameterValue()
setParameterValue(parameterName, parameterValue),
This is to sets a parameter name and parameter value on the FMETransformer. There is no value validation. The incoming value is assumed to be correct.
- setParameterValues()
setParameterValues(parameters),
This is to set all the parameter names and specified parameter values on the FMETransformer. There is no value validation. All incoming values are assumed to be correct.