Validate that Primary Keys are Unique

Search Knowledge Base by Keyword

< Back

The VALIDATEPKEYS Action checks that Primary Keys in the Staging Database are unique. It will check all Primary Keys specified where

  1. The Primary Key is set to “Active” in Tables Sheet of the Control Spreadsheet.
  2. The relevant Foreign Key table and Primary key table is set to “Active” in the Tables Sheet.

To run VALIDATEPKEYS, first open your re-usable .cmd script in a text editor.

If you have already configured a .cmd script for one Subset Action and wish to edit and re-use that script, you should only need to specify “VALIDATEPKEYS” for  -parAction=””:

Data Subsetting

Otherwise, configure all mandatory parameters in the .cmd script. You should also specify the location of the Subset Report using -parReportFile.

You can also specify optional parameters for the Action.

Make sure your Control Spreadsheet, the Subset Report, and any Log Files are closed.

Run the script to add the Primary Keys.

The results are created in the Subset Report:

Data Subsetting

The results can also be analysed in the Log File:

Data Subsetting

In both instances, “All primary keys satisfied” means that all Primary Keys are unique. Otherwise, the number of non-unique keys is reported.