API/Python/Open-Source Solutions

Expand all | Collapse all

Refresh a VDB at the end of the dSource Snapshot

Jump to Best Answer
  • 1.  Refresh a VDB at the end of the dSource Snapshot

    Posted 02-28-2017 11:23:00 AM
    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.

  • 2.  RE: Refresh a VDB at the end of the dSource Snapshot
    Best Answer

    Posted 02-28-2017 02:31:00 PM
    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.