Skip to content

Executing a Driver Support Task Using the SDK

It will often be more convenient to use the SDK utilities to test a driver support since this avoids the need to install or update your plugin, create or update a jdbc driver to reference the driver support plugin, and execute jobs on the Delphix Masking Engine. This can be done from the command line using maskScript.

Using maskScript to Test a Driver Support Task

The maskScript utility is non-interactive, which lets you execute a task on a given data source. The jdbc driver, driver support and task are selected using command-line options. This example uses the Sample Driver Support plugin. This plugin can be built using the process described here.

Create a task set up json file that corresponds to the specific table and desired database with the contents:

{
  "tableMetadata": [
    {
      "name": "Person",
      "schema": "dbo",
      "columns": [
        {
          "name": "column_pk"
        },
        {
          "name": "column_name_1"
        },
        {
          "name": "column_name_2"
        },
        {
          "name": "column_name_3"
        }
      ]
    }
  ],
  "jdbcConnection": {
    "username": "USERNAME",
    "password": "PASSWORD",
    "host": "jdbc:sqlserver://HOST:1433;databaseName=DB_NAME",
    "propertyFilePath": ""
  }
}

Execute the task by indicating the name of the desired task, driver support filepath, task set up json, and jdbc driver:

$ maskScript taskExecute -n "Task Name" -j /path/to/driverSupport.jar -c /path/to/task-setup.json -l /path/to/jdbcDriver.jar

Note

In order to be usable, the class that implements DriverSupport must also be listed in the appropriate service description file. Refer to this section for details.

Use any available database management tool like DbVisualizer to connect to the database and verify that the task was successfully executed.