Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
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! –  Arabella Sep 11 '12 at 12:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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