My model has two model parameters:

  1. A file gdb workspace or sde workspace containing the data
  2. An empty "template" file gdb

As the very first process in my model, I want to check if the schema of the data workspace matches the schema of the template gdb. If they don't match, the model should stop and preferably give some meaningful error message (I suppose by using some Python in a Calculate Value tool). I know this can be done simply by using the Export XML Workspace Document tool now in 10.1, but I'm still on 10 for now, so I need my models to work properly on 10.

1 Answer 1


If you can get a hold of the X-Ray for ArcCatalog add-in (link currently broken for me, the author's site is here if you want to contact them directly), I remember seeing a Python implementation of XML workspace document import/export tools.

There is also the Table Compare tool which you can set to do a schema-only comparison between two tables; you could use some Python scripting to run this against matched pairs of geodatabase tables/feature classes.

You should be aware though that SDE and file geodatabases have some fundamental differences (e.g. File GDB fields have no support for precision/scale) so I would suggest comparing apples to apples.

  • If the input is a SDE workspace, my model first exports it to a file gdb before going further (i.e. this would take place before the comparison). This tool does (mostly) what I have been looking for, and as you mentioned, a little Python code will take care of the rest. Thank you! Sep 11, 2012 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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