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 have a table in an ArcSDE GDB I'd like to step through using Python. For performance reasons I wanted to load it into memory like so:

arcpy.Copy_management('C:/GDB.sde/MyTable', 'in_memory\\MyNewTable')

When I tried this in IDLE I got:

=================== RESTART ===================

Running it in the Python window in ArcMap brought the whole program down. So my question is, can Copy_management actually be used to copy a table into memory? The Esri documentation is pretty vague on what kinds of data you can pass.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

It appears as though the "Copy" command is really used to copy/paste data between identical structures.

Copies input data and pastes the output to the same or another location regardless of size. The data type of the input and output data element is identical.

You're probably better off simply going with the CopyRows command, which should allow you to copy the table into memory.

The output table can be saved in a dBASE, ArcSDE geodatabase, file geodatabase, or personal geodatabase, or as an INFO table.

From experience, though, you can also save to the in_memory workspace.

share|improve this answer

From this document:

The "in_memory" workspace is not supported as the output location.

share|improve this answer
    
Wow, the error code and everything. Nice find! –  RyanDalton Feb 14 '13 at 4:56

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.