span8
span4
span8
span4
It is possible to make use of the Schema (Any Format) reader to read the feature class names out of any database and then pass these names into a FeatureReader transformer to do the actual reading.This makes it possible to translate,for example,multiple Esri file geodatabases,into some other format like shapefile without knowing exactly which feature classes are in the database.
1) Use the Schema (Any Format) reader to read folders of Geodatabases.
In a blank workspace,add a Schema (Any Format) reader to the canvas.For the dataset,click the arrow drop-down menu and select Select Multiple Folders/Files….to get into the Advanced File Browser.
In the Schema (Any Format) reader,use the drop-down arrow to Select Multiple Folders/Files
In the Advanced File Browser,click on Add Folders… and then select the folder which contains all of the geodatabases you would like to read in.For this example,we will be using the Data folder which is contained in the FMEData2018 folder.Then under File/Filter type *.gdb this will select all of the files that have the geodatabase file extension.Finally,enable Subfolders so that the file browser will look through all of the subfolders contained within the Data folder.
Advanced File Browser,select the containing folder,and set the File/Filter to *.gdb and enable Subfolders
The Schema (Any Format) reader will read the list of feature classes in all the geodatabases in the folders and returns the names of the feature classes in an attribute called "fme_feature_type_name".
2) Setup the FeatureReader
Add a FeatureReader transformer to the canvas,connect it to the Schema reader and open up the parameters.In the FeatureReader parameters,set the Format to Esri Geodatabase (File Geodb Open API).For the Dataset,use the drop-down arrow to select the User Parameter SourceDataset_SCHEMA.This parameter was created by the Schema reader.
Next,for the Feature Types to Read select the fme_feature_type_name attribute using the drop-down menu.This attribute is generated by the Schema reader.
Expand the Attribute and Geometry Handling section,and then expand the
The remainder of the FeatureReader parameters can be left as the default.In addition,the FeatureReader also returns the schema of each of these feature classes,which can be accessed by connecting to the
FeatureReader parameters.Set the Format,Dataset,Feature Types to Read and Attributes to Expose
3) Dynamic Writing
Add an Esri Shapefile writer to the canvas and select your output location.For the Shapefile Definition select Dynamic (Advanced).
For the Esri Shapefile writer,set the Shapefile Definition to Dynamic (Advanced)
Connect the writer to both the
Connect the Dynamic writer to the
In the writer parameters,ensure that the Shapefile Name is set to fme_feature_type and that the Geometry is set to From Schema Definition.Finally,change the Schema Source to "Schema From Schema Feature",uncheck any other schemas.
In the Dynamic writer parameters,set the Schema Sources to only "Schema From Schema Feature"
How do I tweak this workspace for an enterprise geodatabase or using the geodb reader?I tried using the SDE connection file but it did not work.
Hi@geospatialloverTo make the Schema (Any Format) reader work with a database,add a Reader as a resource (Readers menu|Add Reader as Resource) to set up the database connection.Set this to read one table.Then publish the Features to Read parameter so that you can select the group of tables at run-time.Then,on the Schema (Any format) reader use the same source dataset name as in the Reader as a Resource.Hope this helps!
Hello Tim,are you able to share your workspace and possible a single GDB(I can make copies of it afterward).This would help me test your 亚搏在线workflow to see where the duplicates are being generated.If you do not wish to share the workspace/data in a public setting - please feel free to submit a case here:https://www.亚搏在线safe.com/support/report-a-problem/
Hi@tim_wood
It seems I have the same problem: the reader reads multiple times the same feature.
Did you solve the issue in the end?
Thanks
Are you still having issues with this?If so,if you can share your workspaces and a sample of your data I can take a look to where the issue is stemming from.
Performing spatial queries on database tables using the FeatureReader
Creating and Associating Geodatabase Domains Dynamically Using A Feature Class and GDB Table
Extract Geodatabase Coded Domain Definitions
Extracting Data within a Clipping Polygon using FeatureReader
Improving Performance when working with Esri Geodatabases
Remove the geometry type appended to feature type name in dynamic mode
Viewing and Inspecting Geodatabases
© 2019 亚搏在线Safe Software Inc |Legal