Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently have a large list of feature datasets and dbf tables in a geodatabase. I would like to join each shapefile with its matching DBF file using the "Make Query Table" tool and then "Copy Features" to produce a new shapefile with specified fields.

I am trying to automate this process so I don't have to manually select field names for each set of data (output table would use the same fields). By using the Iterate Datasets in ModelBuilder, I was hoping to do this. However, the Make Query Table will not connect to the geodatabase and still requires me to plug in a specific table. Does anyone know I can use looping to run this process? Are there any similar examples using python?

Example of Geodatabase: AAA1_part1.shp AAA1_part1.dbf AAA2_part2.shp AAA2_part2.shp ..... .....

Any information would be greatly appreciated! Thanks

share|improve this question
I think the first, most relevant question is how are your tables named? What is unique about them that would allow someone, with a script to say that for a particular featureclass or shapefile, join this particular table to it? – Get Spatial Aug 27 '12 at 19:03
They all feature the same three letter code followed by a number that categorizes each: AAA1_part1.shp with AAA1_part1.dbf. It's only a matter of changing around a single numeric value. – Ryan Aug 27 '12 at 19:24
can you post the operation you'd like to iterate? i'm having a hard time figuring out what you're trying to do. if you post a concrete workflow, i can take a crack at iterating it. – ndimhypervol Aug 28 '12 at 5:48
So my model takes a feature class (AAA1_part1_Streets) and a DBF table (AAA1_part1_Traffic) and does a "Make Query Table" and joins them by a LINKID. I would like to iterate the "Make Query Table " pulling all Traffic DBF and Streets feature classes in my file geodatabase and creating joined feature classes for all pairs. The issue is I can only iterate feature classes, but I can't seem to do both feature classes and DBF files – Ryan Aug 28 '12 at 21:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.