Considerations
When using the FeatureReader transformer, the Feature Types to Read parameter may be set using a user parameter. If this parameter is configured as Choice (Multiple) or Choice with Alias (Multiple), the translation may succeed when a single feature type is selected but fail when multiple feature types are selected.
When multiple feature types are selected, the reader may interpret the selected values as a single combined value rather than separate feature types. Depending on the format, this may result in errors or warnings such as:
Example error:
ERROR | An error occurred while attempting to open the table, feature class or relationship class 'SDEUSER.AddressPoints SDEUSER.CellSignals SDEUSER.DrinkingFountains'. The error number from ArcObjects is: '-2147216057'. The error message from ArcObjects is: {Invalid parameter value passed to function}
Example warning:
WARN | Geodatabase Error (-2147220655): The table was not found. WARN | Could not open File Geodatabase table `CommunityCentres AccessibleParking DrinkingFountains`
Why This Happens
The Feature Types to Read parameter expects a space-delimited list of FMEParsableText values.
However:
- Choice (Multiple) and Choice with Alias (Multiple) user parameters return values formatted as a space-delimited SDF list string.
- This encoding format differs from what the FeatureReader expects.
- When the parameter value is decoded internally, FME interprets the entire string as a single value, rather than multiple feature types.
As a result, the reader attempts to open a single table named after all selected feature types.
How to Resolve It
There are two recommended approaches.
Method 1: Create an Attribute from the Choice Parameter
Instead of passing the user parameter directly to the FeatureReader, retrieve its value as an attribute. Add a ParameterFetcher transformer before the FeatureReader. Open the ParameterFetcher parameters and set:
- Parameter Name: Select the choice user parameter.
In the FeatureReader parameters, set Feature Types to Read to the attribute created by the ParameterFetcher. This ensures the parameter value is correctly interpreted by the FeatureReader.
Method 2: Create the User Parameter Directly in the FeatureReader
Another option is to create the user parameter directly from the Feature Types to Read parameter. Open the FeatureReader parameters. Next to Feature Types to Read, create a User Parameter. Configure the parameter with the following:
- Parameter Type: Choice (Multiple)
- Values: Select Fixed List to populate feature types from the dataset.
If you previously used Choice with Alias, enable:
- Use Alternate Display Name
Update the display name for each feature type if needed.
Creating the parameter directly from the FeatureReader ensures the values are encoded in the format expected by the transformer.
Additional Notes
If you need to dynamically select feature types at runtime, the ParameterFetcher method is typically more flexible and avoids encoding mismatches between parameter types.