Can i configure Python scripts in hook

  • 0
  • 1
  • Question
  • Updated 5 months ago
  • Answered
We have a need to identify schema changes of VDB. So, automated code in python to extract and compare metadata, before and after refresh.

Can these python scripts be configured as hook in VDB?
Photo of santosh kumar

santosh kumar

  • 740 Points 500 badge 2x thumb

Posted 5 months ago

  • 0
  • 1
Photo of Tim Gorman

Tim Gorman, Delphix Field Services

  • 3,816 Points 3k badge 2x thumb
Official Response

Yes.  Hooks on UNIX/Linux environments run in bash and hooks on Windows environment run in powershell.

Either way, you can start a python script as you would normally in either of those shells (i.e. "python", etc).

The trick is likely exiting from shell with the exit status from the script, so follow the call to the python script with "exit $?" in bash and perhaps "exit $LastExitCode" or "exit $?" in powershell.

Hope this helps?