Skip to main content

Masked Provisioning Using Configure Clone Hook Example (KBA9263)




KBA# 9263


Major Release All Sub Releases





Masked Provisioning Via 'Configure Clone Hook'

You may need to mask a VDB when it is provisioned from the Continuous Data Engine (formerly Virtualization Engine). Masked provisioning can be implemented by one of the following:

  •  Assigning an existing Delphix multi-tenant masking job to the dSource. The masking job will get executed as part of the provisioning or refresh of any VDBs from that dSource.
  • Calling a masking job or masking script that will mask the provisioned VDB using a Configure Clone Hook. The masking job could be a Delphix masking job (Continuous Compliance Engine job) or an external or user-defined script(s) that mask the data by other methods.

Masking options as presented during the Provisioning:

     Screenshot 2022-06-23 at 12.41.18.png

This article provides an example of a Configure Clone Hook for the purpose of masking data as part of provisioning/refresh of a VDB, as per the Delphix Engine documentation:

       Screenshot 2022-06-23 at 10.05.57.png


If using a Delphix masking job then the job should have already been created (as a multi-tenant job) and successfully tested from the Continuous Compliance Engine (Masking Engine). If you are using external or non-Delphix tools/scripts for masking, ensure that these have already been successfully tested and mask as expected.

For simplicity, this example uses a DXM toolkit command from the Configure Clone Hook to use and run an existing Delphix masking job to mask the VDB being provisioned.

How To Mask as Part of Provisioning a VDB

Masking during provisioning is declared on the Provision VDB dialog during the provisioning procedure.

  1. Begin the provisioning actions and proceed until you see the Masking dialog.
    Screenshot 2022-06-23 at 11.06.53.png
  2. Click  Screenshot 2022-06-23 at 11.07.42.png.
    This will display the following selection. Click Mask using script(s).
    Screenshot 2022-06-23 at 11.14.00.png

    Clicking on 'Mask using script(s)' will display the following note:
    Screenshot 2022-06-23 at 11.16.25.png

    Cick Next.
  3. On the Hooks dialog, select Configure Clone and click the + icon.
     Screenshot 2022-06-23 at 11.20.54.png

    Clicking the + icon presents the following pop-up. Select Create New.
    Screenshot 2022-06-13 at 16.05.39.png

    The following dialog is displayed:
    Screenshot 2022-06-23 at 11.22.10.png
  4. Enter the details for the new hook being created:
    1. Enter a name/alias for the Configure Clone hook.
    2. Under Operation Type, for this example, it is going to run commands or script(s) from a bash shell (Run Bash Shell Command).
      Note: The following choices are given under 'Operation Type' as the Target is a Unix environment.
      Screenshot 2022-06-23 at 11.33.41.png

      Further information about these operation types are given in the documentation references at the end of this article.
    3. At this point it is important to note that certain environment variables will become accessible to the user-provided commands/scripts.

      For example, for Oracle:
      Screenshot 2022-06-23 at 12.03.22.png

      For example, for SAP ASE:
      Screenshot 2022-06-23 at 12.03.37.png

      This example is going to pass the Oracle_SID as the subject or target for masking to a DMX toolkit command. 
    4. Under Script in Add a new Hook Operation, enter the command(s) or calls to the scripts/tools/program that will mask or execute the masking of the VDB being provisioned. Ensure that these commands/scripts have been fully tested and are successfully callable or runnable as per Operation Type and by the Environment User.
         Screenshot 2022-09-06 at 14.26.58.png

      All the commands above could have also been stored in a script file at the target host, for example,, and you could call that script instead. However, in this example, it aims to show that several commands can be called during Configure Clone. 

      Note: The hook script seen here is just a very basic example and calls Delphix masking jobs via the DMX Toolkit.  
    5. Click Next to see a detailed 'Summary'  about this provision.  Click Submit to begin the actual provision.
      At the end of the Provision and prior to the Snapsync of the VDB, you will see that the 'Configure Clone'/hook operation is invoked:
      Screenshot 2022-09-06 at 14.19.19.png
    6. Upon successful provision, the resultant VDB has been identified as a masked VDB, for example:Screenshot 2022-09-06 at 14.20.24.png

      Under 'Datasets':  Screenshot 2022-09-06 at 14.20.45.png
    7. The sample script has been attached to this article. Please note that this script (calling Delphix masking job via DMX toolkit commands) works but is very basic.


Related Articles

The following articles may provide more information or related information to this article:

  • Provision Masked VDBs:

Masking DocsProvision Masked VDBs

Masking DocsProvision Masked VDBs/Provisioning masked vdbs

  • Information on creating a Delphix Masking job as a Multi-tenant job:

Masking DocsCreating Masking Job

Masking KBAUsing Multi Tenant to Create a Masking Job (KBA1722)

  • Explanation about Hook Operations and Operation Types, and the list of Environment Variables accessible to user-defined scripts/Hooks during provisioning and refresh can be found in the following technical notes and doc pages

KBA: Customizing a VDB using Configure Clone Hook (KBA4011)

Delphix DocsSQL Server Hook Operation Notes

Delphix DocsOracle Hook Operations

Delphix DocsSAP ASE Hook Operations

Delphix DocsDB2 HookOperations

  • Using the Masking API to Run Masking Jobs

Masking DocsAPI Calls for Creating and Running Masking Jobs

  •  Information about the DMX toolkit, Link to download it and use it

KBAHow to Obtain Support for Dxm-Toolkit (KBA3995)

  • This note shows how to download, install, and provides some usage examples of the DMX Toolkit

KBAUsing the Masking DXM Toolkit (DXM) for Reporting Purposes (KBA7628)