Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm using ArcMap and I'm trying to write a script that automates a join and then does some reporting.

I'm not very experienced with joins and I'm running into a problem. When I do a join manually (right clicking the shapefile and specifying the join) it does the join seemingly automatically. However, when I try and do a "Join Field" in ModelBuilder it takes a really long time. Minutes.

Is there a different method of automating a join using python or Model Builder that runs faster?

Thanks for any help.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

If you look at the tool help you'll note that Join Field permanently adds 1 or more fields to the input table.

The tool you probably want is Add Join, which works more like the interactive join command to create a temporary join.

You'll probably want to use Remove Join when you're done though to clean up after yourself.

share|improve this answer

In addition to blah238's answer, you should also use the Add Attribute Index geoprocessing tool to create an index for the join. This tool accomplishes the same thing as this prompt:

enter image description here

This will greatly increase performance. Note that some read-only table file types (e.g. CSV) don't support attribute indices, so you'll have to export them to a .dbf file first.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.