I would like to get a list of geodatabase feature tables from FME. Is it possible with Python? Or another transformer?
-
Do you specifically need to get this list from FME? I only ask since it looks like the data is coming from an Esri geodatabase. Would an ArcCatalog solution be acceptable?– RyanKDaltonCommented Jun 6, 2011 at 22:03
-
ArcCatalog is not the final solution for the development. I use a workbench and i would like a list of GDB feature because i would like to export the feature table to an another file.– user3120Commented Jun 6, 2011 at 22:12
-
1I find the solution with Python is here (gis.stackexchange.com/questions/9981/…)– user3120Commented Jun 7, 2011 at 2:23
-
1As long as you have the ESRI stuff installed; ArcPy is just a wrapper to the ArcGIS classes/Methods; if you are wanting to keep this entirely in the FME realm then Mark's answer is probably your best bet.– D.E.WrightCommented Jun 7, 2011 at 17:12
2 Answers
I would use a dynamic reader (ie one with just a single source feature type with the merge filter set). Then expose the fme_feature_type format attribute. This will give you the name of the table being read.
You can run the data through a DuplicateRemover too, removing duplicate values for fme_feature_type, in order to get a list of unique table names.
There is a Schema format that returns the schema of a dataset, but I think it works only with file-based data, and wouldn't work with a File Geodatabase (though it might with a Personal Geodatabase).
-
Ok, I saw that but didn't have the time to play with it. Thanks for the suggestion Mark! Commented Jun 6, 2011 at 23:33
-
There is a sample of Python with FME ? Thanks– user3120Commented Jun 7, 2011 at 0:18
-
1There shouldn't be any need to use Python. Just expose the source format attribute called fme_feature_type - that will tell you the name of the table where the feature is from. It doesn't need to be dynamic either - I just suggest that as a way for the workspace to operate on any source dataset. Commented Jun 8, 2011 at 16:31
Yes, you can list object in any ESRI connection; as long as you have the ArcGIS Server installed on that machine you can use the list object in ArcPy to return a array of feature classes.
You will just want to make sure that is you are dynamically checking a variety of Geodatabases that you have your parameter for your workspace set.
-
I use a geodatabase file and fme desktop.I have not ArcGis server on my desktop.– user3120Commented Jun 6, 2011 at 22:50
-
Hmmm, ok; that is a different place. I am digging through my Workbench and for the life of me am not seeing a place to actually list what is in the Reader. Commented Jun 6, 2011 at 23:14