3

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.

2 Answers 2

5

From this document:

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

1
  • Wow, the error code and everything. Nice find! Commented Feb 14, 2013 at 4:56
3

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.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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