I am trying to copy an SDE geodatabase table to a file geodatabase using a simple script copied below.
>>> destgdb= 'D:\Data\testAug_23_2022.gdb'
... arcpy.env.workspace= 'C:\Users\gis4\AppData\Roaming\ESRI\Desktop10.6\ArcCatalog\Connection to gisprd.sde'
... table = arcpy.ListTables("table1")
... arcpy.Copy_management(table,os.path.join(destgdb))
It is giving following error, can any point out what may be the issue in this script?
Runtime error
Traceback (most recent call last):
File "<string>", line 5, in <module>
File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 4314, in Copy
raise e
RuntimeError: Object: Error in executing tool