Skip to main content

So I'm trying to append approx. 600 geodatabases all containing 5 feature classes with everything in the same schema. All of the geodatabases are in the same folder and I need to parse through the entire folder appending each one into the Target.gdb. I don't know much about FME, but I feel like this should be pretty straight forward. Any ideas?

You can perhaps use a combination of:

  • A Reader or FeatureReader of Format type "Directory and File Pathnames Reader" pointing to the Folder in question
  • Filter these features using a Tester etc. for features of type "directory" with an extension of "gdb" or whatever matching criteria suits. This will produce the required list of ~600 GDBs as ~600 features.
  • Use these ~600 features as the "Initiator" to a FeatureReader Transformer. This will execute multiple times, once for each GDB file path feature entering the Transformer, and by default will output all features to One Port for all GDBs (There is also an option to create 1 Port per Geodatabase, but I doubt you will want to do that with 600 GDBs!)
  • Within the FeatureReader, set the "Dataset" as a variable, to be @Value(path_directory_windows) etc. For each of the ~600 iterations, then it will use the incoming value of the GDB path as the dataset to read.

It would look a little like this. For testing purpose you can add a Sampler between the Tester and the final FeatureReader to say, limit it to the first 5 GDB paths and see if your workspace works for those before expanding it to the full 600.

From there you have to get into a little bit of schema manipulation since the Schema can't be explicitly defined when using FeatureReader in this mode of outputting everything to a single output port. You can use Dynamic Schema Reading and Writing in which case you should pipe the Schema output of the final FeatureReader to the GDB Writer/FeatureWriter but you may need to massage the resulting Schema Feature output from this Port to make all your Attribute Names and Feature Type names line up to default values if they are different across the 600 GDBs.


Reply