Skip to main content

I would like to be able to read all tables only from both an ESRI file gdb and our SDE db. There are additional feature classes, rasters, views and relationships in there that need to be excluded. If the view tables are captured that is okay - they all have a standard prefix of "View_" so could easily filter those out.

 

I was thinking I can expose the geometry and then select tables only or something. However I am having trouble figuring out the best way to do this. Perhaps this is not the best way.

 

Basically all my tables in a single SDE gdb must be compared against tables split amongst multiple file geodatabases in another folder. So I'll merge all those file gdb's into one, and I need to be able to search through it and look at the tables only to find matches with SDE.

 

We have 50-ish tables and those table names can change so would like it to be dynamic.

 

Is this possible?! 🙂

In the SDE, there is a gdb_items system table which contains all items registered with the geodatabase. Select from that with a SQL Creator. I believe it should identify the geometry type in there, from which you can identify all the regular tables.

 

Pass that into a FeatureReader for the file gdb with table name as an attribute selecting the feature types to read. If that SDE table name isn't in the file gdb, then nothing is read and doesn't match.

There is an equivalent gdb_items table in a file geodatabase too, but I'm not sure how to read it directly. Thankfully you don't need to in this case.

 

The other way is with a FeatureReader, read the SDE database, but under the Schema/Data Features dropdown, set the Features To Read to 'Schema Features' only. Then the schema definition you get in FME (expose the fme_geometry{} list attribute) will describe the geometry type (or lack of) of each feature type on the SDE database. This will work the same way for a file gdb too.


In the SDE, there is a gdb_items system table which contains all items registered with the geodatabase. Select from that with a SQL Creator. I believe it should identify the geometry type in there, from which you can identify all the regular tables.

 

Pass that into a FeatureReader for the file gdb with table name as an attribute selecting the feature types to read. If that SDE table name isn't in the file gdb, then nothing is read and doesn't match.

There is an equivalent gdb_items table in a file geodatabase too, but I'm not sure how to read it directly. Thankfully you don't need to in this case.

 

The other way is with a FeatureReader, read the SDE database, but under the Schema/Data Features dropdown, set the Features To Read to 'Schema Features' only. Then the schema definition you get in FME (expose the fme_geometry{} list attribute) will describe the geometry type (or lack of) of each feature type on the SDE database. This will work the same way for a file gdb too.

oh that's an interesting idea - I see how that will work. It does identify geometry type (in the gdb_items and gdb_item_types table)

 

Thanks!


using a feature reader you can choose to read only the schema. No speficying any feature classes in the reader will then read in all FCs. Because you've only chose the schema, you'll get one feature out the schema port for each feature class in the GDB/SDE. From there you can filter out what you want to keep and if required, use those features and second feature reader to read in the features within the FC


Reply