Refresh a VDB at the end of the dSource Snapshot

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
Hi all,
I have to schedule a refresh of a VDB. The refresh event has to be trigger a snapshot on its dSource so that the refresh will pull the latest data from source.
I thought to use an hook script in prerefresh event of the VDB and call the API to take a snapshot of the dsource.
I have also JetStream active on the Engine. There is a built in function to achieve this goal or it is necessary to use hook scripts?
I don't care if the event starts from the VDB, it could start from the dSource: the goal is to have a VDB refreshed continously from fresh data from source.
Thank you.
Photo of Gianpiero Piccolo

Gianpiero Piccolo

  • 1,578 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Adam Bowen

Adam Bowen, Official Rep

  • 17,884 Points 10k badge 2x thumb
Official Response
Gianpiero, the way I handle this in my SugarCRM demo is that when the dSources are snapshotted, they have a post-sync (snapshot) hook that executes a refresh of a masked child VDB via a script. This is probably that easiest way if you have a static mapping of one dSource to one VDB.

If you have a one-to-many relationship of dSources to VDBs that you want this action to happen with, I would suggest using something like Jenkins to handle the workflow. You could

  1. have the whole snapshot -> refresh workflow be controlled via jenkins
  2. You could have the dSource execute a post-sync hook that does a RESTful call to Jenkins to notify the refresh jobs to start. 
  3. you could setup Delphix to send Jenkins an SMTP/snmp message to alert Jenkins that a snapshot has been performed. 

1-3, in my order of preference.