I have about 1000 feature classes spread over about 50 geodatabases which I am trying to append into an empty layer in a separate geodatabase.
When I previously did this on shapefiles, the process completed quickly. However due to earlier processes (requiring Query Tables) I had to move the data into a GDB, and this attempt to append the layers has been running for about 50 minutes.
Are there any recommendations to decrease the time required to merge these feature classes? Should I copy the feature classes to shapefiles first?
The layers all have the same field set; I am not using any field mappings.
- Loop through the GDBs using arcpy.da.walk; add feature class path/name into a list
- Create a feature class in the output GDB using one of the fcs above as a template
- Use arcpy.Append_management(fclist, out_layername)
Note: While the first step (obtaining the list of FCs via arcpy.da.walk) takes a considerable amount of time, that is acceptable - I'd like to improve the append or merge step.
The specific code snippet I am trying to improve is:
# Set the workspace environment setting arcpy.env.workspace = os.path.join(rootworkingdir, gdbName) out_path = gdbpath out_name = fcname geometry_type = "POLYLINE" template = fclist # Execute CreateFeatureclass arcpy.CreateFeatureclass_management( out_path, out_name, geometry_type, template) out_name = out_path + "/" + out_name arcpy.Append_management(fclist, out_layername)
The total number of expected features is about 5000.