Generate the Subset Rules

Search Knowledge Base by Keyword

< Back

The BUILDMODEL Action creates the rules to drive the Subset.

BUILDMODEL uses information from the following sheets in the Control Spreadsheet:

  1. TheSQLCriteria sheet in the Basic Control Spreadsheet.
  2. The Table Sheet created when the GETMETADATA or TABLES action was run.
  3. 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:

  1. RulesList
  2. ProcessModel

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:

BUILDMODEL Log

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:

Data Subsetting

Each Rule is reflected in a row. The columns for each row are:

  1. ParentTable: The Parent Table name
  2. ChildTable: The Child Table name
  3. ParentColumn: The Parent Key Columns
  4. ChildColumn: The Child Key Columns
  5. Active: Set to “Yes” or “No” to include a Rule or not.
  6. ParentSchema: The Source Parent Schema name
  7. ChildSchema: The Source Child Schema name
  8. FKName: The Foreign Key name
  9. Direction: “DOWN” or “UP” indicates the relationship between ParentTable and ChildTable
  10. 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:

Data Subsetting

Each Rule is reflected in a row. The columns contained for each rule are:

  1. Direction: “DOWN” or “UP” gives the direction of the relationship between the Table and RefTable.
  2. Schema: The Source Schema name.
  3. Table: The Source Table name.
  4. Columns: The Key Column names in the Table.
  5. RefSchema: The Source Schema name.
  6. RefTable: The Source Table name.
  7. RefColumns: The Key Column names in the RefTable
  8. 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 “Subset3_buildmodel.cmd” script.

You should only need to specify “BUILDMODEL” for  -parAction=””:

Otherwise, configure all mandatory parameters in the .cmd script.

You can also specify optional parameters at this stage.

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 the BUILDMODEL completed without errors.