You can also run Subset Actions from the command line using .CMD scripts. A set of template scripts are shipped in the data-type folders of "VIPTDM\SubsetCloneAndMaskRun". If you retained the default installation locations, this folder scan be found under C:\VIPTDM\SubsetCloneAndMaskRun. You will find five template scripts:
The script names tell you that:
"Subset_MetaData.cmd" – The action is used for subsetting
"Subset1_MetaData.cmd" – The order in which the Action specified in the script are typically performed.
"Subset1_MetaData.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.
Each .CMD script is formatted as follows:
Under "REM Script Parameters" (rows 2-14 above), you can set parameters. Each row is a different parameter that can be "Set". The parameters are then passed into the script used to Call VIPExecutor (Row 19 above).
The parameters listed under "REM Script Parameters" have been given intuitive names. For example, parDatabaseType is simply named "Database".
First, edit "Database" (row 8 above) to specify one of the following four database types:
For instance, the following parameter should be used when subsetting a Postgres database:
set database=SQL Server
Next, under "flowdirectory" (row 2 above) specify location of the two .vip workflows used during subsetting. If you retained the default location during installation, the flow directory will be "C:\VIPTDM\SubsetCloneAndMask":
Under "rundirectory" (row 3 above) specify the location of your Run Directory. For example
Next, you must specify the file name of your Basic Control Spreadsheet under "controlspreadsheet" (row 4 above). This will point the VIP workflow to the Basic Control spreadsheet stored in the Run Directory. For example:
Next, specify where the folder in which the generated Log files and Subset Report will be stored. Use "outputdirectory"(row 5 above) to set a folder directory. You can specify a folder within your Run Directory folder as follows:
set outputdirectory=%rundirectory%folder name
Next, specify the Subset Actions that you would like to perform for "Action" (row 6 above). For example, to run the GETMETADATA action, set:
Multiple Actions can be executed by one Script. To execute multiple actions, separate list the Action name in a comma separated list.
These are the mandatory parameters for executing a Subset Action using Test Data Automation. They must be set each time an Action is run.
You can additionally set optional parameters in the call row (row 19 in the above example). To do this, please refer to the examples in the parameters list. It's advised that you first review the existing parameters in the call row to see if a default has been set. In this instance, simply update the existing parameter.
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 in the folder you specified under "outputdirectory":
TEST DATA AUTOMATION DATA SUBSETTING SUBSET ACTIONS