Delphix Products

 View Only
  • 1.  Delphix Masking Job - are there (going to be) hooks available?

    Posted 02-27-2023 05:53:00 AM

    Hi 
    I'm aware that there is the "pre SQL script" and "post SQL script" functionality available in the masking job definition dialog (GUI) , but I couldn't find any detailed docs on how these features should/could be used (limitations/types of scripts/security requirements/etc.). 
    Is there something like hooks in the virtualisation engine available or going to be available - where we could call a shell script before /after masking job completion?
    I want to implement a notification mechanism and call an external API when masking is completed....
    Any suggestions would be welcome.
    Thanks!
     



    ------------------------------
    Arkadiusz Slawek
    DevOps Engineer
    Credit Suisse AG
    ------------------------------


  • 2.  RE: Delphix Masking Job - are there (going to be) hooks available?

    Posted 02-27-2023 06:14:00 AM

    Hello Arkadiusz, 

    In pre and post script you can write simple SQL statement.

    like disable/enable  triggers, drop/rebuild indexes write down in in notepad save as text and attached as pre and post script.

    to call external API > you can download dxmc utility > Install it on any target server from where delphix engine can be reachable > Make one shell script in that write down ./dxmc job start <JOB NAME> engine name 

    wait 

    give path for the external api file, so that this file always launch after completion of  masking job.

    Kindly let me know if its not clear for you ..i will try to give more clarification



    ------------------------------
    PANKAJ ASEGAONKAR
    Delphix masking analyst
    Infosys
    ------------------------------



  • 3.  RE: Delphix Masking Job - are there (going to be) hooks available?

    Posted 02-27-2023 06:39:00 AM

    Thank you Pankaj.

    Can I call a stored procedure (I'm masking Oracle/MsSQL DBs) from the "post SQL script" ? 

    Is this the dxmc utility you mentioned: GitHub - delphix/dxm-toolkit

    Arek



    ------------------------------
    Arkadiusz Slawek
    DevOps Engineer
    Credit Suisse AG
    ------------------------------



  • 4.  RE: Delphix Masking Job - are there (going to be) hooks available?

    Posted 02-27-2023 07:00:00 AM

    Can I call a stored procedure (I'm masking Oracle/MsSQL DBs) from the "post SQL script" ?

    For now Pre and post script only support simple SQL statements . ( DELETE/UPDATE/DROP/TRUNCATE/REBUILD/CREATE).

    Is this the dxmc utility you mentioned: GitHub - delphix/dxm-toolkit?

    Yes ..

    First download > Transfer to server > Untar > Add engines to dxmc and then you can perform masking related operations 



    ------------------------------
    PANKAJ ASEGAONKAR
    Delphix masking analyst
    Infosys
    ------------------------------



  • 5.  RE: Delphix Masking Job - are there (going to be) hooks available?

    Posted 02-27-2023 07:41:00 AM

    Thank you Pankaj. 

    While dxmc would help, it looks like it is waiting for the job to complete before returning the control. 
    While it's great for jobs that complete quickly, there is still a challenge for handling long running jobs (and I'm talking couple hours long) or timeouts.
    I think some hook-type / notification mechanism internal to the engine would be nice... 




    ------------------------------
    Arkadiusz Slawek
    DevOps Engineer
    Credit Suisse AG
    ------------------------------



  • 6.  RE: Delphix Masking Job - are there (going to be) hooks available?

    Posted 02-28-2023 06:08:00 AM

    Hello 

    You can do one thing.

    Is there something like hooks in the virtualisation engine available or going to be available - where we could call a shell script before /after masking job completion?

    In virtualization engine > Click on VDB > HOOKS > POST SNAPSHOT > you can hook any script here or specify path of the bash shell script.

    Hooks are attached to VDB

    Steps : 

    Once your masking job  completed

    Take snapshot using dxtoolkit or manually 

    Once you take snapshot > Hook script will start executing

    You can use this approach



    ------------------------------
    PANKAJ ASEGAONKAR
    Delphix masking analyst
    Infosys
    ------------------------------



  • 7.  RE: Delphix Masking Job - are there (going to be) hooks available?
    Best Answer

    Posted 03-06-2023 02:03:00 AM

    Hello,

    the pre/post scripts allow to call procedures / functions .. but you cannot use transactional sql constructions or variables. It supports only plain ANSI sql statements. You can call a procedure without arguments for sure .. believe you could add fixed strings as arguments for a procedure as well. The more recent versions of masking engine allow you to see in monitoring if the  job currently executes the pre- or postscript allowing to see what is currently happening (older versions did not show that).

    BR .. Tino



    ------------------------------
    Tino Pironti
    Masking SME
    Technical Manager
    Delphix
    ------------------------------