I want to copy a table from SDE to a local file gdb.
Assuming
SDEworkspace is the full path to the SDE database
outGDB is the full path to the local file gdb
Here is the code:
arcpy.env.workspace = SEDworkspace
tableName = "MasterStreetName"
outTableName = "{}\{}".format(outGDB, tableName)
arcpy.Copy_management(tableName, outTableName)
Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 4314, in Copy raise e ExecuteError: ERROR 000840: The value is not a Data Element.
This script used to work and other features are copied correctly, just seem to have problem with tables.
One notable item is a possible typo in your script, "arcpy.env.workspace = SEDworkspace" may need to be "SDEworkspace". Or is this just a typo in your post?
It's just a typo in the post.
What do you mean by this :
SDEworkspace is the full path to the SDE database
The variable SDEworkspace should contain a full path and name of a sde connection file.
It has the full path name of a sde connection file.
I just posted pseudo code.
1) Does the error message listed correspond to your sudo code? In particular the File “<string>”, line 1 relate to the arcpy.env.workspace = SDEworkspace line 1 in your sudo code.
Here is the code:
arcpy.env.workspace = SEDworkspace
tableName = "MasterStreetName"
outTableName = "{}\{}".format(outGDB, tableName)
arcpy.Copy
Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 4314, in Copy raise e ExecuteError: ERROR 000840: The value is not a Data Element.
2) is this running as a stand-alone script or in ArcGIS. I have seen this error when coping a feature when it is active in the TOC from desktop scripts.