Post-Subset Actions

Search Knowledge Base by Keyword

< Back

Further actions can be performed following a subset. Each is again informed by information in the Control spreadsheet and leverages an automated and pre-defined VIP Workflow. The  post-Subset Actions are:

  1. ADDPKEYS: Adds Primary Key Constraints to the Subset in the Staging Database.
  2. ADDFKEYS: Adds Foreign Key constraints.
  3. ADDKEYS: A composite action that performs both ADDPKEYS and ADDFKEYS, adding both Primary and Foreign Key Constraints to the Staging Database.
  4. VALIDATEPKEYS: Checks that all Primary Keys are unique.
  5. VALIDATEFKEYS: Checks whether Foreign Keys can be added to the data.
  6. VALIDATEKEYS: A composite action that runs both VALIDATEPKEYS and VALIDATEFKEYS.
  7. DELETEORPHANS: Removes rows that do not fulfil Foreign Key constraints. This is useful if FoundCriteria have been specified.
  8. Data edits: Various actions will edit the resultant data Subset:
    1. DROPFKEYS: Drops Foreign Keys.
    2. DROPPKEYS: Drops Primary Keys.
    3. DROPKEYS: A composite action that runs DROPFKEYS and DROPPKEYS, dropping both Foreign and Primary Key Constraints.
    4. TRUNCATE: Deletes the data from the target Database or Schema, allowing you to subset iteratively.
    5. DROP: Drops the tables created by the PREPENV Action.

Many of these Actions performed post-Subset create a functioning data set that can be used during testing and QA. For instance, adding Primary and Foreign Keys incorporates the relationships in the data needed for many types of automated testing.

Knowledge Base articles are provided on configuring each relevant sheet in the Basic/Advanced Control Spreadsheet, and running the Action associated with them. The below table summarises all Actions available when subsetting using Test Data Automation, and the sheets used to configure them. It also summarises which sheets the actions overwrite or populate in the Control Spreadsheet; if blank, it means that these actions are performed on the basis of the Source Data only:

ActionDefinitionInformed by data in the following sheetsPopulates/overwrites data in
GETMETADATARetrieves the metadata from the Source Data that is needed to run the Subset

A composite action, it runs the TABLES, GETKEYS and FINDIDENTITYCOLUMNS actions.
TABLESRetrieves metadata from the source database.TablesTables
GETKEYSRetrieves metadata from the source database.ForeignKeys
FINDIDENTITYCOLUMNSFinds identity columns in the source databaseTables
PREPENVCreates tables and indexes in the Staging Database.
BUILDMODELCreates the rules to drive the Subset.SQLCriteria
Tables
ForeignKeys
SoftKeys
HashCodes
ProcessModel
RuleList
SUBSETWrites data to the staging database.FoundCriteria
HashCodes
SubsetResults
ADDPKEYSAdds Primary Key Constraints to the Data Subset.Tables
ForeignKeys
ADDFKEYSAdds Foreign Key constraints.Tables
ForeignKeys
ADDKEYSRuns ADDPKEYS followed by ADDPKEYS.Tables
ForeignKeys
VALIDATEPKEYSChecks that all Primary Keys are unique.Tables
ForeignKeys
VALIDATEFKEYSChecks whether Foreign Keys can be added to the data.Tables
ForeignKeys
VALIDATEKEYSRuns VALIDATEPKEYS followed by VALIDATEFKEYS.Tables
ForeignKeys
DROPFKEYSDeletes Foreign Keys from the Data Subset.Tables
ForeignKeys
DROPPKEYSDeletes Primary Keys from the Data Subset.Tables
ForeignKeys
DROPKEYSRuns DROPFKEYS followed by DROPPKEYS.Tables
ForeignKeys
TRUNCATEDeletes the data from the target Database or Schema, allowing you to subset iteratively.
DROPDrops the tables created by the PREPENV action .

The Knowledge Base articles on data subsetting will explain how to configure and perform the Actions associated with a Basic Subset. It then sets out how to refine the Advanced Control Spreadsheet and perform iterative Subsets, before detailing the Actions that might be performed Post-Subset.

The Data Subsetting of the Knowledge Base does not provide instructions on exposing a Subset to a shared server or self-service test data web portal. This process is generic to all Test Data Automation utilities.