Run a table comparison to generate table pairs between tables in two specified folders. Data Validation Option also generates count and value tests for each table pair.
In Data Validation Option, click
Action
Compare Tables
.
The
Compare Tables
dialog box appears.
Select the repositories that contain the tables that you want to compare.
Select the folders that contain the tables that you want to compare.
Select
Sources
or
Targets
for each subfolder.
Select the default connection for each folder.
If the connection is for IBM DB2, enter the default database owner name in the
Owner
field.
If connection is for flat files, in the
Source Dir
field, enter the default directory that contains the files.
If the connection is for SAP, click
Select SAP Table Parameters
and configure the default SAP source parameters.
Select
Sort in DB
to push the sorting logic for joins in table pairs to the database.
You can select whether to save all the bad records.
If you choose to save all the bad records, select whether to save the bad records in a flat file or in the Data Validation Option schema.
To generate table pairs for tables that have different names, select
Table names differ between source and target
, and then click
Browse
to find the spreadsheet file that contains the table pair definitions.
To generate table pairs for tables that have the same name, select whether to compare columns by name or position.
If you select compare columns by position, if applicable, specify the number of columns to skip in Table A or Table B.
In the
Folder to Place Tests
field, select the folder to store the table pairs and tests.
In the
Tests to Include
field, specify whether to generate count tests or count and value tests.
In the
Trim Trailing Spaces from All Generated Tests
field, select whether to trim the trailing spaces in the values of table columns.
To generate value and outer value tests for tables that do not have primary keys, click
Browse
to select the text file that lists the primary keys for the flat files or tables.
If you select a primary key for the table and specify a primary key file, Data Validation Option ignores the primary key file.
If a primary key does not exist for a table or file, in the
If no PK
field, select whether you want to generate count tests only or skip the test generation.
If you skip the test generation and no primary key is defined, Data Validation Option does not generate the table pair.
Click
Next
.
The
Compare Tables
dialog box previews table pairs that will be generated.
The following figure shows a preview of the table pairs that will be generated and the errors:
Selected table pair
Errors for the selected table pair
To not generate a table pair, select the table pair and click
Remove
.
If there is a problem with a table pair, select the table pair to view the error.
If an error says that no join is defined, select the table pair, and then select the join fields in the
Join Conditions
area.
Click
Mismatched Tables
to view a list of all tables that are not matched in each folder.
Data Validation Option does not generate a table pair or tests for tables that are not matched.
Click
Finish
.
Data Validation Option generates the table pairs and tests.
If a default setting does not apply to a particular table in a table pair, you can edit the table pair to change the setting after Data Validation Option generates the tables pairs and tests. For example, if a table requires a different connection than the default connection that you specified for all tables in the table comparison, edit the table pair and change the connection.