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

To run BUILDMODEL, 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 “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.

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.

Review the ProcessModel Sheet

The ProcessModel sheet contains the rules to drive subsetting:

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

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.