Geodatabase Schema Compare (Data Reviewer)
サマリ
Compares a base and test schema and reports the differences between the two that are relevant to data loading, such as feature classes, tables, spatial references, and field definitions.
使用法
This tool only reports differences in the schema of the databases and does not compare the contents.
-
The base file is considered the authoritative file for the schema, while the test file contains a schema that will be compared to the base to determine whether it has the expected schema.
Comparison is done against XML workspace documents. When geodatabases are selected for the base_geodatabase_schema or test_geodatabase_schema parameters, the schema is exported to an XML workspace document before the comparison occurs.
The following table explains which schema elements are compared and provides a general description of the results.
Schema element
Results description
Domains
Domains and domain values that are in the base or test schema and not present in the test or base schema or have attributes that differ, such as the coded values and their descriptions.
Feature classes
Feature classes that are not present in the test or base schema or have attributes that differ, such as the name or spatial reference.
Feature datasets
Feature datasets that are present in the base or test schema but not in the test or base schema or have attributes that differ, such as the name, dataset type, and spatial reference.
Fields
Fields that are present in the base or test schema but not in the test or base schema or have attributes that differ, such as the name, type, length, precision, and scale.
Tables
Tables that are present in the base or test schema but not in the test or base schema or have attributes that differ, such as the name, alias, and field names.
Topologies
Topologies that are present in the base or test schema but not in the test or base schema or have attributes that differ, such as the feature classes and rank
This tool does not compare relationship classes, networks, geometric networks, and representations. It does not work with rasters or annotation.
This tool does not compare system generated fields like OBJECTID, SHAPE.AREA, and SHAPE.LEN.
構文
パラメータ | 説明 | データ タイプ |
base_geodatabase_schema |
XML document or geodatabase that contains the authoritative version of the geodatabase schema. | Workspace;File |
test_geodatabase_schema |
XML document or geodatabase that contains the schema to compare to the base version. | Workspace;File |
output_folder_path |
Folder where the comparison report will be generated. This folder will contain other folders and files that support the derived html_output parameter. | Folder |
ignore_options [ignore_options;ignore_options,...] (オプション) |
Indicates the properties that will not be compared.
| String |
コードのサンプル
The following Python example demonstrates how to use the GeodatabaseSchemaCompare tool.
# Name: SchemaCompareExample.py
# Description: Compares two schemas and reports their differences
# Author: Esri
# Date: September 2013
import arcpy
arcpy.CheckOutExtension("datareviewer")
# Define variables
base = "c:/data/edit_sample.xml"
test = "c:/data/edit_modifications.xml"
folder = "c:/data/sc_results"
ignoreOptions="IGNORE_DATABASETOPOLOGY;IGNORE_HASMS"
# Compare the workspaces
arcpy.SchemaCompare_Reviewer(base,test,folder,ignoreOptions)