TSTool / Command / CompareTables
CompareTables command compares columns from two tables, saving the results in a new table.
Comparisons are made using the data values formatted as strings based on the precision shown in tables.
If the table was read with
the precision for floating point numbers is set based on the largest
number of digits after the decimal encountered in the input.
Optionally, a precision and tolerance can be specified to control the comparison of floating point values.
Values that are the same are shown in the new table without modification.
Values that are different result in both table values being shown (as strings) to allow comparison.
The command also allows the comparison table to be output to an HTML file, in which case different values are shown as red.
The following dialog is used to edit the command and illustrates the command syntax.
CompareTables Command Editor (see also the full-size image)
The command syntax is as follows:
|The identifier for the first table to be compared.||None – must be specified.|
|The identifier for the second table to be compared. None – must be specified.|
||The names of columns to be compared from the first table, separated by commas.||All columns will be compared.|
||The names of columns to be compared from the second table, separated by commas.||All columns will be compared.|
||The number of digits after the decimal to consider when comparing floating point values. If values are different to the specified (or default) precision, both values are shown in the comparison table.||Format floating point numbers as strings for comparison according to the table column precision.|
||A value indicating the allowed difference between floating point values. The tolerance should be consistent with the precision (i.e., don’t specify a coarse precision and fine tolerance). If the difference is less than the tolerance, the values will not be marked as different.||Floating point values must exactly match, according to the precision.|
||The allowed number of differences before triggering a Warn/Fail message (see
||The identifier for the new comparison table.||
||If specified, an HTML table will be created for the comparison table, in which different values are highlighted in red.||No HTML output file will be created.|
||Indicates the action to be taken if the tables are different:
||Do not generate a warning if the tables are different.|
||Indicates the action to be taken if the tables are the same:
||Do not generate a warning if the tables are the same.|
See the automated tests.