APIPythonOpen-Source Solutions

  • 1.  How to replicate Jetstream shared-bookmark function on dxtoolkit or Delphix API

    Posted 11-10-2017 04:06:00 AM

    I was trying to replicate the "shared bookmark" functionality in jetstream to dxtoolkit.

    Assume we have dsource named MYSOURCE. 
    And there are 2 VDBs provisioned from MYSOURCE, named VDB1 and VDB2.

    In jetstream, if I defined 2 containers for VDB1 and VDB2 each, user A can create a shared bookmark on VDB1, and another user B can refresh VDB2 using that shared bookmark.

    In dxtoolkit, i tried creating a snapshot and bookmark on VDB1, but when trying to refresh VDB2 using that bookmark it failed with "Unable to refresh to a TimeFlow point from a container other than the provision container".

    I can workaround this limitation by deleting and re-provisioning VDB2 from another VDB's snapshot / bookmark, but this will delete existing snapshot / bookmark on VDB2 (so i may instead need to create new VDB3 and stop VDB2 just in case VDB2 data is still required).

    Does anyone has similar experience? I believe whatever available in Jetstream is available via API, but no idea how to achieve this shared-bookmark functionality using dxtoolkit or direct API in non-Jetstream environment (we do not want to depend on Jetstream for automation workflow) .

    Thanks & Regards,
    tomi


  • 2.  RE: How to replicate Jetstream shared-bookmark function on dxtoolkit or Delphix API
    Best Answer

    Posted 11-10-2017 10:46:00 AM
    The operation you want there is 'restore' and not 'refresh'. 

    Te best way to move from the Web Interface to scripted operations is to try it via the CLI and use the "setopt trace=true" option.

    I cover how to do that in part 2 of my "Working with delphixpy" series, found here:
    http://www.adam.today/2016/06/working-with-delphix-python-module.html


    ----See Below---

    delphix jetstream container 'QA Data Pod' restore *> setopt trace=true 

    delphix jetstream container 'QA Data Pod' restore *> commit

    === POST /resources/json/delphix/jetstream/container/JS_DATA_CONTAINER-6/restore ===

    {

        "type": "JSDataContainerRestoreParameters",

        "timelinePointParameters": {

            "type": "JSTimelinePointBookmarkInput",

            "bookmark": "JS_BOOKMARK-63"

        },

        "forceOption": false

    }

    === RESPONSE ===

    {

        "type": "OKResult",

        "status": "OK",

        "result": "",

        "job": "JOB-1260",

        "action": "ACTION-1784"

    }

    === END ===

        Dispatched job JOB-1260






  • 3.  RE: How to replicate Jetstream shared-bookmark function on dxtoolkit or Delphix API

    Posted 11-14-2017 08:00:00 AM
    hi Adam,

    thank you for pointing out the tracing option.

    I tried, and a single jetstream restore command produced 7000+ line, and after removing all the status updates there were still 60+ jobs. Frankly feel this was overwhelming unless you already very familiar with Delphix API.

    Assuming we are using jetstream, dxtoolkit jetstream calls (dx_ctl_js_xyz) works fine to restore one container from another container using shared-bookmark (though i can't find an option on dx_ctl_js_bookmarks to create a "shared" bookmark).

    Still, i think it will be great to achieve similar functionality (restoring VDB from another VDB without deleting the former VDB) without using jetstream at all, still a mystery.

    regards,
    tomi