I have about 100 feature classes inside twenty feature datasets inside a geodatabase. We have about 50 individual geodatabases. I want to load all geodatabases one by one in a one single master geodatabase. I believe anyone with experience in Python programing can help me. I don't have any coding experience.

closed as off-topic by Vince, John Powell, Erica, Mapperz Dec 8 '15 at 16:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – Vince, John Powell, Erica, Mapperz
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Do you want a master table in the master gdb or just load many tables to the one master gdb? – artwork21 Dec 8 '15 at 12:45
  • 2
    Welcome to GIS SE. AS a new user, please take the Tour. Questions requesting coding assistance are expected to include code. Please edit the question to include your first coding attempt. – Vince Dec 8 '15 at 12:46
  • "load many gdbs" doesn't mean anything. Geodatabases have "feature classes" (tables). The question is how you want to copy all the feature classes into one geodatabase -- append identically named tables (with identical attributes), or just transfer all the uniquely named tables into new tables. – Vince Dec 8 '15 at 14:37
  • let me rephrase my question. Pardon for my poor english language . i want to automate append tool that will iterate through featuredatesets and featureclasses inside those featuredatasets in a geodatabse and append those feature classes (Tables) Into corresponding featureclass in another gdb. both gdb have same schema . – mehraj quarish Dec 8 '15 at 16:00
  • @Vince I solved it :) – mehraj quarish Dec 10 '15 at 9:52

arcpy.da.Walk was designed for this type of operation. This example assumes that all of your feature classes have unique names. If not, you will need to add logic to automatically rename duplicates.

import arcpy, os

inws = r"C:\temp"  # Input workspace
outws = r'C:\temp\out_data.gdb'  # Output workspace
fcs = []  # Create an empty list to store fc paths

# You can specify the type of feature classes too if you wish 
walk = arcpy.da.Walk(inws, datatype="FeatureClass")

for dirpath, dirnames, filenames in walk:
    for filename in filenames:
        fcs.append(os.path.join(dirpath, filename))

# Loop through the fcs list and copy to a new file geodatabase
# This assumes all fc names are unique
for fc in fcs:
    arcpy.CopyFeatures_management(fc, os.path.join(outws, os.path.basename(fc)))
  • Thank @Aaron, I need append not copy Features. I solved it :) – mehraj quarish Dec 10 '15 at 9:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.