Running a Subset Action from the Command Line

Search Knowledge Base by Keyword

< Back

You can also run Subset Actions from the command line using .CMD scripts. A set of template scripts are shipped in the “VIPTDM\SubsetCloneAndMaskRun” folder during install. If you retained the default installation locations, this folder scan be found under C:\VIPTDM\SubsetCloneAndMaskRun. You will find five template scripts:

  1. Subset1_getmetadata.cmd
  2. Subset2_prepenv.cmd
  3. Subset3_buildmodel.cmd
  4. Subset4_subset.cmd
  5. Subset4_truncatesubset.cmd

The script names tell you that:

  1. Subsetcmd” – The action is used for subsetting
  2. “Subset2cmd” – The order in which the Action specified in the script are typically performed.
  3. “Subset2_getmetadata.cmd” – The Subset Action that the template script performs.

Each .CMD script should be edited using a text editor before executing a new Action. You must set the mandatory parameters and any optional parameters required.

The mandatory parameters should already be present in the re-usable .cmd script, and you simply need to edit them. Perform a find in the script to locate the existing parameter and specify a new one. If not, simply the standard code to the script and specify the parameter.

First, edit -parDatabaseType=”” to specify one of the following five database types:

  1. -parDatabaseType=”MySQL”
  2. -parDatabaseType=”SQL Server”
  3. -parDatabaseType=”Postgres”
  4. -parDatabaseType=”Oracle”
  5. -parDatabaseType=”DB2″

For example:

Data Subsetting

Next, specify location of the .vip workflow under the parameter


Subsetting uses the flow. Enter the location of this flow:

Data Subsetting

Next, you must specify the location of your Control Spreadsheet under


For example:

Data Subsetting

Next, specify the Subset Actions that you would like to perform under


Multiple Actions can be executed by one Script. To execute multiple actions, separate list the Action name in a comma separated list.

For example, to perform TABLES and then GETKEYS, specify:

Data Subsetting

Next, specify where the folder in which the generated Log files will be stored. Use


For example:

Data Subsetting

Finally, specify the name of the Subset Report, and the folder into which it will be generated. Use


to specify the directory. For example:

Data Subsetting

These are the mandatory parameters for executing a Subset Action using Test Data Automation. They must be set each time an Action is run.

Run the Action

Once you have parameterized your .cmd script, you can run the action from Command Prompt, or can be executed simply by double clicking it. Each time a script is run, its progress will be shown in the PutFlowsInMemory window with any error messages displayed. Two outputs will further be created:

  1. A Log File
  2. A Subset Report