I have 150+ feature classes in SDE for which I need to create an empty feature class in a file geodatabase. For these feature classes I need to import the attributes and the name of the feature class as in SDE. I tried to export to an XML workspace document but it is not working because of some error on the SDE and I'm not an SDE administrator, so I am unable to modify the things on the SDE.
An alternative to this that I tried was creating a script in Python for creating the feature class. I get the names of the feature class from the SDE but am unable to create them on the local SDE.
Also how can I read the geometry type for the feature class in arcpy?
Here is the code I've written:
import arcpy arcpy.env.workspace= r"C:\Users\088927\AppData\Roaming\ESRI\Desktop10.0\ArcCatalog\ENT-QA @ sample.sde" fcList = arcpy.ListFeatureClasses('sde."ENT-QA".*',"","") output = "C:/Users/088927/Desktop/Schema.gdb" for fc in fcList: fullName = arcpy.ParseTableName(fc) #fcTemplate = fc. finallist =  nameList = fullName.split(",") databaseName=nameList ownerName = nameList fcName = nameList  fcStr = str(fcName) print fcStr arcpy.CreateFeatureclass_management(r"C:\Users\abc\Desktop\Schema.gdb",fcstr)