Iterating through gdbs to export identically named tables

512
1
10-05-2020 12:05 PM
BillJacobs
New Contributor II

Hello,

I have over 100 geodatabases that contain multiple feature classes and tables. Each gdb is named a little differently, but inside each are identically named feature classes and tables. I want to iterate through each gdb, extract one of the tables by name, and then export it to a different gdb.

I wanted to use iterate workspaces in model builder, but could not find how to then use the table to table tool. I'm able to modify scripts, but not great and creating them myself. If someone has a small script for this I'd be grateful!

Tags (2)
0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

You need to use sub-modelling, see help file. You iterate over workspaces, then in each workspace you iterate over the datasets, pulling out only the one you are interested in and that's the one you export. So a model within a model.

0 Kudos