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

Can you access joined tables through a da.SearchCursor?

I've found documentation to do this with SearchCursor (arcpy), but nothing for the 10.1 data access module.

share|improve this question
up vote 3 down vote accepted

I realized that the join in ArcMap does not persist in an arcpy session. So I needed to create the join in arcpy before accessing the table with a SearchCursor. A simple example:

import arcpy
from sys import exc_info
from traceback import format_tb

exoticPath = r"...\Exotic_Species"


    with arcpy.da.SearchCursor("exotic", ["Exotic_Species.Species","Treatment_Protocols.Priority"]) as cursor:
        for row in cursor:
            print (row[0], row[1])

        tb = exc_info()[2]
        tbinfo = format_tb(tb)[0]
        pymsg = "PYTHON ERRORS:\nTraceback info:\n" + tbinfo + "\nError Info:\n" + str(exc_info()[1])
        msgs = "ArcPy ERRORS:\n" + arcpy.GetMessages(2) + "\n"
        print pymsg + "\n"
        print msgs

    if arcpy.Exists("exotic"):
    if arcpy.Exists("protocols"):
share|improve this answer

The arcpy.da.*Cursor are functionally equivalent to their arcpy.*Cursor counterpart... some additional niceties (context, more sql), and lots more speed. see doc for full details:

When writing new code, always use arcpy.da.Cursors. If you have critical code that uses old cursors, you may want to switch that code to new cursors.

share|improve this answer

Your Answer


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.