Title: SAFE FME: How to iterate through Featureclasses in a GDB and write their Filename to an attribute in a separate featureclass
Tags: fme;file-geodatabase
Question: I have a GDB which contains raster datasets and Vector featureclasses .
Each Featureclass contains only one polygon. The Polygon represents project areas whose name is also the title of the featureclasse e.g "BP_2247"
In the Featureclass itself this name is not written to an attribute.
I therefore want to merge all featureclasses together whilst also writing their filename into a new attribute in the merge file.
My first problem is how to get Safe FME to iterate through a GDB and only use Featureclasses?
Comment: add from the format attributes [in Feature Type Properties] geodb_feature_dataset should give you the attribute needed using the Geodatabase ArcObjects Reader (not geodb open api)

Comment: Thanks. But can I simply iterate through all Datasets somehow instead of getting 150 individual readers?

Comment: You can use Single Merged Feature Type when adding them all will show as one reader.

Comment: You could use a schema reader. [http://docs.safe.com/fme/html/FME_ReadersWriters/Default.htm#schema/schema.htm%3FTocPath%3DFME%20Readers%20and%20Writers%20(formats%20supported%20by%20FME%202014)%7CSchema%20(Any%20Format)%20Reader%7C_____0](Documentation) [http://fmepedia.safe.com/articles/How_To/Geodatabase-XML-Workspace-Document-Schema-Reader](example)



{'source': 'StackExchangeDataset', 'subset': 'gis.stackexchange.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 4, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2014:00:10/27/14', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<fme><file-geodatabase>', 'Title': 'SAFE FME: How to iterate through Featureclasses in a GDB and write their Filename to an attribute in a separate featureclass', 'ViewCount': 1004, 'id': 119883, 'user_AboutMe': None, 'user_AccountId': 994395.0, 'user_DisplayName': 'Robert Buckley', 'user_Reputation': 10003.0, 'user_Views': 1077.0, 'user_id': 5636.0}}