Skip to main content
Skip table of contents

Setting hook operations

You can construct hook operation lists through the Delphix Management application or the command-line interface (CLI). You can either define the operation lists as part of the provisioning process or edit them on virtual datasets that already exist.

Setting hook operations through the Delphix management application

The provisioning wizard still imports hook operations from templates.

Hook operations can be provisioned in the Hooks tab of the Add dSource or Add VDB wizards.

  1. Select the type of operation and enter a name, operation type, and script.

  2. To remove an operation from the list, click the Trash icon on the operation.

  3. When you have set all hook operations, click Next to continue with the provisioning process.

To edit hook operations on a virtual dataset:

From the Datasets panel, you can create hook operations from a template.

  1. In the Datasets panel, click the virtual dataset.

  2. Click the Configuration tab.

  3. Within the Configuration tab, click the Hooks tab.

  4. Select the hook to edit.

  5. The current operations at this hook will be displayed. To edit this list of operations, click the Pencil icon in the top right-hand corner of the tab.

  6. Click the Plus icon to add a new operation.

  7.  Select the type of operation or click

    to load a hook operation template. 

  8. Click the text area and edit the contents of the operation.

  9. To remove an operation from the list, click the Trash icon on the operation.

  10. When you have set all hook operations, click the checkmark to save the changes.

The provisioning wizard still imports hook operations from templates.

Setting hook operations through the CLI

To specify hook operations during linking, edit the relevant hook's array of operations defined on the LinkingParameters > Source > Operations object.

To specify hook operations during provisioning, edit the relevant hook's array of operations defined on the ProvisionParameters > Source > Operations object.

To edit hook operations on a dSource that already exists, edit the relevant hook's array of operations defined on the Source > Operations object.

To edit hook operations on a virtual dataset that already exists, edit the relevant hook's array of operations defined on the Source > Operations object.

For more information about these CLI objects, see the following documentation in the Help menu of the Delphix management application:

  • LinkedSourceOperations

  • VirtualSourceOperations

  • RunCommandOnSourceOperation

  • RunExpectOnSourceOperation API

Example of editing hook operations through the CLI

  1. Navigate to the relevant source's  VirtualSourceOperations  object.

  2. Select a hookto edit.

    delphix> source
    delphix source> select "pomme"
    delphix source "pomme"> update
    delphix source "pomme" update *> edit operations
    delphix source "pomme" update operations *> edit postRefresh

  3. Add an operation at index 0.

    delphix source "pomme" update operations postRefresh *> add
    delphix source "pomme" update operations postRefresh 0 *> set type=RunCommandOnSourceOperation
    delphix source "pomme" update operations postRefresh 0 > set command="echo Refresh completed."
    delphix source "pomme" update operations postRefresh 0 > ls
    Properties
     type: RunCommandOnSourceOperation (
    )
     command: echo Refresh completed. (
    )
    delphix source "pomme" update operations postRefresh 0 *> commit

  4. Add another operation at index 1 and then delete it.

    set command="echo Refresh completed."delphix source "pomme" update operations postRefresh *> add
    delphix source "pomme" update operations postRefresh 1 *> set type=RunCommandOnSourceOperation
    delphix source "pomme" update operations postRefresh 1 *> set command="echo Refresh completed."
    delphix source "pomme" update operations postRefresh 1 *> back
    delphix source "pomme" update operations postRefresh *> unset 1
    delphix source "pomme" update operations postRefresh *> commit


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.