I have two GDB's that are the same schema. One is a master GDB that we are appending other individual GDB's into. The GDB's contain several points, polys, lines, and tables as well as 2 datasets with additional feature classes. I've started with a bit of code I found from https://community.esri.com/thread/105313#comments and modified the multiple GDB's to a single. The code appears to do what I want; append feature classes that are within the datasets to the master and append all root feature classes into the master.
When I run the script I get the error
Traceback (most recent call last): File "C:\Python27\Temp\append.py", line 20, in arcpy.Append_management(appendinput,GDBD+'/'+fcr,"TEST") File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\management.py", line 3995, in Append raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000338: Inputs must be either all Feature Classes, Tables or Rasters; not mixed. Failed to execute (Append).
Since the code specifically lists only feature classes, I'm not sure where the mixed inputs is coming from as tables should not be included. How can I adjust this code? (I'm new to python and coding in general)
import arcpy
from arcpy import env
##Destination GDB
GDBD="C:\Python27\Temp\GLOBAL_GEODATABASE.gdb"
##List of Origin GDB
GDBS="C:\Python27\Temp\UPRR_CaliforniaModel_20170130_1.gdb"
##Set Environment
arcpy.env.workspace=GDBD
##Get List of FDS
FDS=arcpy.ListDatasets()
##Get List of Root Feature Classes
ROOTFCS=arcpy.ListFeatureClasses("","POLYGON")
##Append elements in Root Feature Classes
for fcr in ROOTFCS:
appendinput=[]
for FCI in GDBS:
appendinput.append(FCI+"/"+fcr)
##print appendinput
arcpy.Append_management(appendinput,GDBD+'/'+fcr,"TEST")
##Append elements of Feature Classes inside Feature Datasets
for FD in FDS:
for FC in arcpy.ListFeatureClasses("*","POLYGON",FD):
appendinput2=[]
for FCI2 in GDBS:
appendinput2.append(FCI2+"/"+FC)
##print appendinput2
arcpy.Append_management(appendinput2,GDBD+'/'+FC,"TEST")