Question

Setting up a user parameter that allows the user to select a specific feature class from a geodatabase

  • 21 November 2019
  • 2 replies
  • 39 views

Hi,

I'm relatively new to FME and am coming up against an issue when setting up user parameters that will allow a user to specify an individual geodatabase feature class.

I want to allow a user to select a specific feature class from a geodatabase, similar to how you can specify individual feature classes within ArcGIS when using geoprocessing tools. While I can specify which feature classes should be read when reading a geodatabase, when this geodatabase is set up as a user parameter, the user can only specify the input geodatabase and FME will then look for feature classes using the names that I used during creation of the workbench.

Also , If I have taken two feature classes from one geodatabase and another from a separate geodatabase, I will only have 2 user parameters available; one for each geodatabase. Ideally, for the user, I would want three user parameters, one for each feature class and for it to not matter if these feature classes are in the same or separate geodatabases.

Currently I just have it set up so that all feature classes are stored in a single geodatabase, with each of the feature classes using standard names. This then requires the user to set up their feature classes in the same manner, using the specified standard names.

 

Any help would be much appreciated!

Thanks,

Sam


2 replies

Badge

A simple solution that works if there is no performance issues due to large geodatabases, and you always have a set list of feature classes, could be to create a published parameter where you create a list of feature types for the user to choose from. Then you expose fme_feature_type in your source and send the data through a Tester that checks fme_feature_type against the published parameter that the user has chosen.

Badge +16

Yes it isn't an easy adjustment to the FME world where it is workspaces that are handled and not feature types. Look at how to create a scripted parameter for the feature types to read:

https://knowledge.safe.com/articles/60080/python-scripted-parameters.html

However, the feature types to read set cannot be dynamically generated from available feature classes, you have to code the possible values.

If you have ArcGIS Data Interoperability you can make an ETL tool that you embed in a ModelBuilder model that does dynamically supply Feature Types To Read to the ETL Tool.

I can feel a blog post coming on...

..and here it is @samaye!

https://community.esri.com/community/open-platform-standards-and-interoperability/blog/2019/11/21/make-etl-data-sources-dynamic-with-modelbuilder

 

Reply