kind of odd, but in schema reader, "fme_feature_type_name" exposes only the feature type name in this case, core and slices
but if you use a feature reader, "fme_feature_type_name", it exposes as "apples\\core" and "apples\\slice"
maybe its a bug, IDK. I have a workaround, but would be nice if this was in schema reader
This should not be a Bug. The schemareader does not read the featruedatasetname.
You can use GDB reader to expose geodb_feature_dataset. You can set whereClause to "OBJECTID"=1,so you can get a FeatureDataset Name with only one feature.
Of course, the premise of this method is that you have at least one feature per featureclass.
featuredataset-nameexpose.fmwt
This should not be a Bug. The schemareader does not read the featruedatasetname.
You can use GDB reader to expose geodb_feature_dataset. You can set whereClause to "OBJECTID"=1,so you can get a FeatureDataset Name with only one feature.
Of course, the premise of this method is that you have at least one feature per featureclass.
featuredataset-nameexpose.fmwt
I just used the feature reader to do this, instead of the schema reader.
This should not be a Bug. The schemareader does not read the featruedatasetname.
You can use GDB reader to expose geodb_feature_dataset. You can set whereClause to "OBJECTID"=1,so you can get a FeatureDataset Name with only one feature.
Of course, the premise of this method is that you have at least one feature per featureclass.
featuredataset-nameexpose.fmwt
The only way I have found (under FME 2021.1) to get the Schema (Any Format) reader to read and record geodatabase (GDB) feature dataset names is:
- In a new workspace, add a Schema (Any Format) Reader
- DO NOT touch the Format: dropdown. Leave it as "Schema (Any Format)."
- For the Dataset: dropdown, enter the GDB whose schema you wish to read. (You may have to enter the path and GDB folder strings manually and separately; the folder navigator under this reader behaves anomalously.)
- Under Workflow Options, choose Individual Feature Types
- Now, click the Parameters ... button. Notice that the Input Format: dropdown in the dialog that pops up reads "<Guess format name from extension>." DO NOT TOUCH THIS DROPDOWN. The "guess format" mode is what makes the Schema reader read and record feature dataset names. If you use the dropdown to specify "Schema (Any Format)" or to choose one of the specific data formats, you will NEVER see the "guess format" mode choice again in that Schema (Any Format) reader instance. You could try deleting that particular reader and adding another, but, if you have along the way checked a "Save as default parameters" (or whatever that common checkbox says) after changing the Format: or Input Format: dropdowns, you certainly will never see the "guess format" mode choice again. A new workspace is the only way to get it again.
Of course, there's no free lunch ... The output from the reader will prepend FeatureDataset/ to the feature class name and put the whole string in the fme_feature_type_name attribute of the schema object. You will have to post-process fme_feature_type_name to extract the feature dataset names.
PLEASE reply here if you have any further information to add. This has been driving me nuts in my current task, and I have had just about as much trouble getting a FeatureReader to read schemas correctly, too.
I think/hope I have cracked it:
- Add a FeatureReader, specify "Esri Geodatabase (File Geodb)", and specify your GDB
- In "Parameters...", set Feature Read Mode = Metadata
This should give you the geodb_feature_dataset attribute on your Generic port, which you will need to expose
I think/hope I have cracked it:
- Add a FeatureReader, specify "Esri Geodatabase (File Geodb)", and specify your GDB
- In "Parameters...", set Feature Read Mode = Metadata
This should give you the geodb_feature_dataset attribute on your Generic port, which you will need to expose
@Arnold Bijlsma Very nice! Thank you so very much for answering this rather old message. I haven't run into this problem much since, but just lately I have, and it was critical that I solve it. You did that, and I am grateful. Other above solutions work, but they require a feature from which to extract the feature dataset. I am dealing with empty template geodatabases.
It really gets my goat that the solution was a parameter that was sitting there all along but one that is undocumented in the FME help files. I had no idea really what the Metadata choice for that parameter did, and I never investigated it. Serves me right not to be curious, but really, Safe: update your FeatureReader (transformer) help files to document this parameter!
Thanks, again, for this answer!