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.
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.
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:
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:
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:
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.
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.
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:
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.