Generate the Subset Rules
Search Knowledge Base by Keyword
The BUILDMODEL Action creates the rules to drive the Subset.
BUILDMODEL uses information from the following sheets in the Control Spreadsheet:
- TheSQLCriteria sheet in the Basic Control Spreadsheet.
- The Table Sheet created when the GETMETADATA or TABLES action was run.
- The ForeignKeys and SoftKeys The ForeignKeys sheet will be created by the Basic Subset Job. The SoftKeys sheet can be configured in advance.
BUILDMODEL uses the Subset Criteria and relationships specified in these sheets to formulate the rules that will drive the Subset. The Subset will thereby retain the relevant relationships in the Source Database, containing all related data cross tables needed for a complete Subset.
BUILDMODEL will create and populate the following sheets in the Control Spreadsheet:
If these sheets already exist, an iterative Subset will overwrite them.
To run BUILDMODEL, open The VIP Server Controller from your desktop or start menu. You must open it as an administrator.
Load your re-usable Config file for the current Subset. You should have created this when you ran GETADATA. See this article for instructions.
Check and complete all mandatory parameters in the “Flow Cache Server” tab and commit the automated workflows to memory. See this article for instructions.
Next, complete the mandatory parameters in the “Run Flow” tab. In addition to filling out the mandatory fields in the UI, PREPENV generally requires the following Arguments:
parAction – Enter BUILDMODEL to run the BUILDMODEL action:
parAction=BUILDMODEL
parControlExcel – Specify the location of your Excel Configuration spreadsheet. For example:
parControlExcel=C:\Users\VIP1\Documents\Subsetting Documentation 5.0\VIPsubsetStartPoint.xlsx
parDatabaseType – Specify the database type. For example, enter the following argument when working with SQLServer:
parDatabaseType=SQL Server
parReportFile – Specify the name and location to which your Subset Report file will be saved. Include the file name and .txt extension, not just a directory. For example:
parReportFile=C:\Users\VIP1\Documents\Subsetting Documentation 5.0\SubsetReport.txt
parSQLActionsPath – when running any Subset action, you must always specify the location of the SQLActions vip Enter the following arugment:
parSQLActionsPath=C:\VIPTDM\SubsetCloneAndMask\SQLActions.enc.vip
You can also specify any Optional parameters or Arguments at this point. See this Knowledge Base article for a full list of Arguments and example parameters.
See this Knowledge Base article for instructions on parameterising an action.
An example BUILDMODEL action appears as follows in the VIP Server Controller:
Once you have parameterized the BUILDMODEL Action, make sure your Configuration Spreadsheet, Subset Report and Log file are all shut. Next, click “Create File” and then click “Start” to run the action.
In the output dialogue, you will see something like following once the BUILDMODEL Action is complete”:
The Log file will display something like the following after BUILDMODEL is complete:
If you receive an error message in your output dialogue or log, please refer to this article to troubleshoot common issues. You can also run your Action on debug mode for a more detailed log.
Finally, check your Subset Report to check that the BUILDMODEL has run successfully:
Review the ProcessModel Sheet
After running BUILDMODEL, you should check your ProcessModel sheet to make sure you are happy with the rules.
The ProcessModel sheet contains the rules to drive subsetting. An example ProcessModel sheets appears as follows:
Each Rule is reflected in a row. The columns for each row are:
- ParentTable: The Parent Table name
- ChildTable: The Child Table name
- ParentColumn: The Parent Key Columns
- ChildColumn: The Child Key Columns
- Active: Set to “Yes” or “No” to include a Rule or not.
- ParentSchema: The Source Parent Schema name
- ChildSchema: The Source Child Schema name
- FKName: The Foreign Key name
- Direction: “DOWN” or “UP” indicates the relationship between ParentTable and ChildTable
- Level: The level in the hierarchical table relationships of the rule.
You should check your ProcessModel sheet after running BUILDMODEL to make sure you are happy with the rules. An example RuleList sheet appears as follows.
You can additionally check the Log File and Subset Report at this stage, to check that the Actions have performed correctly.
Review the RuleList Sheet
After running BUILDMODEL, you should check your RuleList sheet to make sure you are happy with the rules.
The RuleList sheet contains the rules to drive subsetting:
Each Rule is reflected in a row. The columns contained for each rule are:
- Direction: “DOWN” or “UP” gives the direction of the relationship between the Table and RefTable.
- Schema: The Source Schema name.
- Table: The Source Table name.
- Columns: The Key Column names in the Table.
- RefSchema: The Source Schema name.
- RefTable: The Source Table name.
- RefColumns: The Key Column names in the RefTable
- FK_Name: Foreign key name
You should check your RuleList sheet after running BuildModel to make that it has been populated.
You can additionally check the Log File and Subset Report at this stage, to check that the Actions have performed correctly.
Run BUILDMODEL from the Command Line
To run BUILDMODEL from the Command Line, first set the mandatory parameters in the template “Subset_3_Build.cmd” script:
- Database
- Flowdirectory
- Rundirectory
- Controlspreadsheet
- Outputdirectory
- Action
You can also specify optional parameters at this stage. Use this Knowledge Base article for instructions on setting parameters in your command script.
Make sure your Control Spreadsheet, the Subset Report, and any Log Files are closed.
Run the script.
Check your log file and Subset Report to make sure that BUILDMODEL completed without errors.
-
-
-
- IEnumerable to Data Reader
- Data Table to List
- Nested String List to Data Table
- List to Data Table
- IEnumerable to List
- List to IEnumerable
- Remove from List
- Exists in List
- Value Exists in Dictionary
- Key Exists in Dictionary
- Remove from Dictionary
- Get from Dictionary
- Clear Dictionary
- Add to Dictionary
- Clear List
- Add to List
- Show all articles ( 1 ) Collapse Articles
-
-
-
-
- Introduction
- Overview of the Advanced Control Spreadsheet
- Refining the Control Spreadsheet
- The ProcessModel sheet – Toggling Subset Rules
- The Tables Sheet: Defining Metadata that will be read from the Source Database
- The ForeignKeys Sheet - Specifying which Foreign Keys to read from the Source Database
- Explanation of Remaining Sheets in the Control Spreadsheet (for reference only)
-
- Overview of Post-Subset Actions
- Add Primary Keys
- Add Foreign Keys
- Add Both Primary and Foreign Keys (The Composite ADDKEYS action)
- Validate that Primary Keys are Unique
- Validate that Foreign Keys are Unique
- Validate Both Primary and Foreign Keys (The composite ValidateKeys Action)
- Drop Foreign Keys
- Drop Primary Keys
- Drop both Primary and Foreign Keys (The composite DROPKEYS Action)
- Delete Orphans
- Truncate Data
- Drop Tables
-
-
- How to Configure the Synthetic Test Data Configuration Control Sheet
- Sample Commerce Configuration Sheet Examples
- Adding Event Hooks in Configuration sheet for custom functionality
- Use Event Hooks to call VIP Flows
- How the PreProcessVariables Table is used in the Configuration sheet
- PreProcess Variables and Parameters
- Using SQL Functions to query Databases and Using the Queries in Data Generation Functions
- Different Methods for Connecting to Source Databases
- Summary of the Process to Configure the Test Data Configuration sheet
-
-
-
-
-
- Test Modeller : System requirements (Windows, Linux)
- Test Modeller : Installation components
- Test Modeller: Software Pre-requisites
- Test Modeller Core (Linux) Installation
- Test Modeller Core (Linux) Optional – Active Directory
- Test Modeller Core (Linux) Optional – SSL Certificate Installation
- Test Modeller Core (Linux) Optional – Postgres LDAP
- Test Modeller – Maintenance
- The UI Recorder
-
-
-
- Articles coming soon
-
- Articles coming soon
-
-
-
- Welcome Selenium (Java)
- Prerequisites (Selenium Java)
- Configuration (Java)
- Scan an Existing Web App
- Build a Model (Java)
- Generate Automation Code
- Execute Tests (Java)
- Import existing framework / custom page objects (Advanced)
- Edit Code Templates (Advanced)
- Extend Test Modeller (Advanced)
- Common Problems
-
-
-