Skip to main content

I am trying to export a SDE database into a file geodatabase with the domains intact. I first used a dynamic reader and writer, but only the data was written into the file geodatabase. I thought maybe I could use an xml schema file to bring the domains over. I used arcPy to export the schema file:

arcpy.ExportXMLWorkspaceDocument_management('C:\\data\\connectionfile.sde', 'C:\\data\\output.xml', 'SCHEMA_ONLY', 'BINARY', 'METADATA'))

This produced a schema file and I can open it in a text editor and see that it has the domains defined. However, when using this file in the "Import XML Workspace Document (Schema Only)" parameter, I get the following error:

ERROR |Unable to import schema from template 'C:\\data\\output.xml'. The error number from ArcObjects is: '-2147220649'. The error message from ArcObjects is: {Cannot create a table with a duplicate column.}

 

I also get the same error when trying to use the Esri Geodatabase (XML Workspace Document) reader.

 

Has anyone ever experienced this before? Does anyone know of a work around for this error?

@jschweppe​ that should work. Try exporting your Schema only using ArcCatalog instead of a python script. They should be the same but...dialogCan you use ArcCatalog to import the XML schema to create a new File Geodb?

If you can include a copy of the XML file we can take a look.


Reply