Skip to main content

Table Compare (Data Management Tools)

Summary

Compares two tables or table views and returns the comparison results.

Usage

  • This tool returns messages showing the comparison result. By default, the tool will stop running after encountering the first difference between the inputs. To report all differences, check the Continue Comparison parameter.

  • If the differences reported between the input datasets are due to the addition or deletion of records, only the first reported difference is valid. All reported differences after the addition or deletion will be due to the comparison being out of sequence. The compare tools do not attempt to find the next set of matching records after an added or deleted record is encountered.

  • This tool can report differences and similarities with tabular values and field definitions.

  • Multiple sort fields can be specified. Both the Input Base Table and Input Test Table parameter values are sorted based on the fields you specify. The first field is sorted, the second field is sorted, and so on, in ascending order. Sorting by a common field in both the base and test table ensures that you are comparing the same row from each input dataset.

  • By default, the Compare Type parameter is set to All. This means all properties of the tables being compared will be checked, including field properties and attributes. Specify a different compare type to compare specific properties.

  • The Ignore Options parameter provides the flexibility to omit properties from the comparison. These properties include extension properties, subtypes, and relationship classes.

  • When omitting fields that are not included in the field count comparison, the field definitions and tabular values for those fields are ignored.

  • Attribute tolerances can only be specified for numeric field types.

  • The Output Compare File parameter value will contain all similarities and differences between the Input Base Table and Input Test Table parameter values. This file is a comma-delimited text file that can be viewed and used as a table in ArcGIS. For example, it can be queried to obtain all the object ID values for all the rows that are different.

  • When using this tool in Python, get the status of the comparison from the returned Result object using the index position of 1.(result[1]). The value will be 'true' when no differences are found and 'false' when differences are found.

    Learn more about using tools in Python

Parameters

Label Explanation Data type

Input Base Table

The data that will be compared with the Input Test Table parameter value. This parameter value is data that you have declared valid. This base data has the correct content and information.

Table View; Raster Layer

Input Test Table

The data that will be compared with the Input Base Table parameter value. This parameter value is data that you have made changes to by editing or compiling new information.

Table View ; Raster Layer

Sort Field

The field or fields that will be used to sort records in the inputs. The records are sorted in ascending order. Sorting by a common field in both inputs ensures that you are comparing the same row from each input dataset.

Value Table

Compare Type

(Optional)

Specifies the comparison type that will be used.

  • AllAll properties will be compared. This is the default.

  • Attributes onlyOnly the attributes and their values will be compared.

  • Schema onlyOnly the schema will be compared.

String

Ignore Options

(Optional)

Specifies the table properties that will not be compared.

  • Ignore extension propertiesExtension properties will not be compared.

  • Ignore subtypesSubtypes will not be compared.

  • Ignore relationship classesRelationship classes will not be compared.

  • Ignore field aliasField aliases will not be compared.

String

Attribute Tolerance

(Optional)

The numeric value that will determine the range in which attribute values are considered equal. This parameter only applies to numeric field types.

Value table columns:

  • FieldThe numeric field that the tolerance will be applied to.

  • ToleranceThe numeric value that determines the range in which attribute values are considered equal. This only applies to numeric field types.

Value Table

Omit Fields

(Optional)

The field or fields that will be omitted during comparison. The field definitions and the tabular values for these fields will be ignored.

String

Continue Comparison

(Optional)

Specifies whether the comparison will continue after encountering the first difference between the inputs.

  • CheckedThe tool will continue after encountering the first difference.

  • UncheckedThe tool will stop after encountering the first difference. This is the default.

Boolean

Output Compare File

(Optional)

The output file that will contain all similarities and differences between the inputs. This file is a comma-delimited text file that can be viewed and used as a table in ArcGIS.

The output file that will contain all similarities and differences between the inputs. This file is a comma-delimited text file that can be viewed and used as a table in ArcGIS.

File

Derived output

Label Explanation Data type

Compare Status

The compare status will be 'true' when no differences are found and 'false' when differences are found.

Boolean

Environments

Current Workspace

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes