Remove Unused Columns from Geodatabase with FME
One of Locus's clients have a process that produces geodatabases (GDB) where over half of the attributes are liable to be unused and they wanted to be able to remove them from the GDB before delivery. Which attributes are unused changes for each run so any solution needed to be able to automatically detect which are unused and remove them.
My solution, which is available below, involves using:
- a Schema Reader to read in the existing schema to get the data types of the attributes,
- a FeatureReader to read in all the features and find all the used attributes,
- a FeatureMerger to merge the data types with the attributes,
- a ListBuilder to create a schema list (attribute{}),
- a second FeatureMerger to merge the schema list with all the features,
- a FileGDB writer in dynamic mode to write out the GDB using the schema from the first feature.
The Workspace, created in FME 2015.1 is available for download here.
For more information on FME please visit Locus.