>>> arcpy.ExtractData_production("'C:\\Temp\\Python\\GRSM_20140326075058.gdb\\Boundaries_And_AOIs\\grsm_bndry_polygon'","C:\\Temp\\Python\\GRSM_20140326075333.gdb","DO_NOT_REUSE","NO_FILTER_BY_GEOMETRY","INTERSECTS","") <Result 'C:\\Temp\\Python\\GRSM_20140326075333.gdb'>
>>> import arcpy >>> arcpy.CheckOutExtension("Foundation") u'CheckedOut' >>> arcpy.ExtractData_production("C:/Temp/Python/GRSM_20140326075058.gdb/Boundaries_And_AOIs/grsm_bndry_polygon","C:/Temp/Python/GRSM_20140326075333.gdb","DO_NOT_REUSE","NO_FILTER_BY_GEOMETRY","INTERSECTS","")
Traceback (most recent call last): File "<pyshell#26>", line 1, in <module> arcpy.ExtractData_production("C:/Temp/Python/GRSM_20140326075058.gdb/Boundaries_And_AOIs/grsm_bndry_polygon","C:/Temp/Python/GRSM_20140326075333.gdb","DO_NOT_REUSE","NO_FILTER_BY_GEOMETRY","INTERSECTS","") AttributeError: 'module' object has no attribute 'ExtractData_production'
I'm able to verify the path is valid in the following (sorry for the formatting Geonet toolbars don't work in IE):
import arcpy, sys, traceback
from arcpy import env
import time, os
from subprocess import call
arcpy.CheckOutExtension("Foundation")
arcpy.CheckOutExtension("Spatial")
arcpy.CheckOutExtension("Network")
OutFolder = "C:\\GDB\\OUTPUT\\"
OutName = "TEST_"+time.strftime("%Y%m%d%H%M%S")+".gdb"
GDB = OutFolder+"\\"+OutName
if os.path.exists("C:\\GDB\\TEST.gdb"):
arcpy.Delete_management("C:\\GDB\\TEST.gdb")
else:
print ("Nothing to Delete")
arcpy.env.configKeyword = "DEFAULTS"
arcpy.CreateFileGDB_management(OutFolder, OutName)
arcpy.env.workspace = "C:\\GDB\\RESTON DB.sde"
arcpy.ExtractData_production("TEST.DBO.Boundaries_And_AOIs",GDB,"DO_NOT_REUSE","","","")
arcpy.ExtractData_production("TEST.DBO.Air_Photo_Footprints",GDB,"DO_NOT_REUSE","","","")
arcpy.ExtractData_production("TEST.DBO.Elevation",GDB,"DO_NOT_REUSE","","","")
arcpy.ExtractData_production("TEST.DBO.GridsAndGrats",GDB,"DO_NOT_REUSE","","","")
arcpy.Compact_management(GDB)
if os.path.exists("C:\\GDB\\TEST.gdb"):
arcpy.Delete_management("C:\\GDB\\TEST.gdb")
else:
print ("Nothing to Delete")
arcpy.Copy_management(GDB, "C:\\GDB\\TEST.gdb", "")
The example at http://desktop.arcgis.com/en/arcmap/10.3/tools/production-mapping-toolbox/extract-data.htm shows a selection being applied to the input feature layer as well as a test to make sure there is only 1 feature selected before creating the value table of input datasets. I'm simply not familiar with this tool and what it is supposed to accomplish but it looks like you are attempting to initiate the tool over and over on the unique data within the gdb rather than generating a value table of input datasets and executing the tool once with this parameter.
Instead of executing on each input dataset,
arcpy.ExtractData_production("TEST.DBO.Boundaries_And_AOIs",GDB,"DO_NOT_REUSE","","","")
arcpy.ExtractData_production("TEST.DBO.Air_Photo_Footprints",GDB,"DO_NOT_REUSE","","","")
arcpy.ExtractData_production("TEST.DBO.Elevation",GDB,"DO_NOT_REUSE","","","")
arcpy.ExtractData_production("TEST.DBO.GridsAndGrats",GDB,"DO_NOT_REUSE","","","")
The example shows that each of these need to be as a single input parameter,
#change your workspace to the folder rather than the sde connection file
arcpy.env.workspace = "C:/GDB/"
# create a value table of input datasets and filter options
inDatasets="RESTON DB.sde/TEST.DBO.Boundaries_And_AOIs;RESTON DB.sde/TEST.DBO.Air_Photo_Footprints;RESTON DB.sde/TEST.DBO.Elevation;RESTON DB.sde/TEST.DBO.GridsAndGrats ALL_ROWS"
# extract data
reuseSchema="DO_NOT_REUSE"
useFilter="FILTER_BY_GEOMETRY"
filterType="CONTAINS"
arcpy.ExtractData_production(inDatasets,extractGdb,reuseSchema,useFilter,filterType,inFeaturesLyr)