[GIS] Creating model to copy feature classes from ArcSDE to FIle Geodatabase

arcgis-desktopenterprise-geodatabasefile-geodatabasemodelbuilder

I am trying to create a model in ArcGIS that copies the feature classes which are stored in SDE geodatabase “SQL” to file geodatabase “in order to sync my SDE data to FGDB“, here what is the best practice to do this, I mean I am trying to use copy features tool, but It seems not efficient because of the following reason which is that I have 10 feature classes stored in my sde database so I need to use copy feature 10 times with 10 parameters and if one of my F.C was renamed then I should edit the model again , If there is any tool or method that copies the whole sde to FGDB

Best Answer

The best way to handle this in ModelBuilder is to use the Iterate Feature Classes tool. It will find all the feature classes in the specified workspace (such as SDE geodatabase) and create an iterable list which you can then process with the Copy Features GP tool. The Copy Features will all the feature classes one by one, and you shouldn't care if any changes occur in the SDE geodatabases.

Alternatively, you could use the arcpy's ListFeatureClasses function if you are comfortable with Python. It might be actually way faster to write a Python script that will copy the feature classes between the geodatabases comparing to building a model. Look at the samples here:

HowTo: Automate copying datasets from one database to another