APIPythonOpen-Source Solutions

  • 1.  How to add multiple file mapping rules in Oracle VDB provisioning using the CLI

    Posted 04-17-2015 12:39:00 PM
    Hello,

    I'm trying to use the CLI to provision an oracle VDB.
    Everything goes fine with only one file mapping rule.

    I wonder how to add multiple file mapping rules.

    Thnks in advance,
    Giorgio

    #DemoEnvironment


  • 2.  RE: How to add multiple file mapping rules in Oracle VDB provisioning using the CLI

    Posted 04-17-2015 12:47:00 PM
    Hi Giorgio,

    I looked for it in the API docs: http://[engine_ip]/api/#FileMappingParameters 
    It seems that the mapping rules set is wrapped into one string and you have to break each rule with a "\n" new line char. However I'm wondering how it can be done into a command line shell.

    set source.fileMappingRules="01:02"\n...

    I hope that there is somebody to help us.

    Regards.
    Gianpiero 


  • 3.  RE: How to add multiple file mapping rules in Oracle VDB provisioning using the CLI
    Best Answer

    Posted 04-20-2015 02:13:00 PM
    I found it, but it is necessary that delphix do something to fix the problem.

    I debugged what the CLI send to Delphix with the setopt trace=true command.

    Here is the output:
    LandsharkEngine> setopt trace=trueLandsharkEngine> database fileMapping
    LandsharkEngine database fileMapping *> set timeflowPointParameters.container="DB"
    LandsharkEngine database fileMapping *> set mappingRules="10:01\nora:era"
    LandsharkEngine database fileMapping *> commit
    === POST /resources/json/delphix/database/fileMapping ===
    {
        "type": "FileMappingParameters",
        "mappingRules": "10:01\\nora:era",
        "timeflowPointParameters": {
            "type": "TimeflowPointSemantic",
            "container": "ORACLE_DB_CONTAINER-13"
        }
    }

    The problem is that the CLI escapes the backslash char ("\") and then it does not send the new line char ("\n") to the server. So we are fooled ;-) 



  • 4.  RE: How to add multiple file mapping rules in Oracle VDB provisioning using the CLI

    Posted 04-20-2015 03:26:00 PM
    Thank you for letting us know, we will work on this and update you when we have something!


  • 5.  RE: How to add multiple file mapping rules in Oracle VDB provisioning using the CLI

    Posted 04-20-2015 11:08:00 PM

    Hey Gianpiero,


    Unfortunately we do not currently support new lines in our CLI. We are currently aware of this limitation and have an RFE filed to address it in a future release of the Delphix Engine.



  • 6.  RE: How to add multiple file mapping rules in Oracle VDB provisioning using the CLI

    Posted 04-21-2015 07:17:00 AM
    Ok. I understand. Please, may you give us some samples of JSON to request Virtual to Physical process?

    POST /resources/json/delphix/database/export
    {
       ...
    }

    Thanks a lot.
    Gianpiero