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

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered
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
Photo of Giorgio Segnato

Giorgio Segnato

  • 332 Points 250 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Gianpiero Piccolo

Gianpiero Piccolo

  • 2,336 Points 2k badge 2x thumb
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 
Photo of Gianpiero Piccolo

Gianpiero Piccolo

  • 2,336 Points 2k badge 2x thumb
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 ;-) 
Photo of Abdullah Mourad

Abdullah Mourad, Employee

  • 90 Points 75 badge 2x thumb

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.

Photo of Gianpiero Piccolo

Gianpiero Piccolo

  • 2,336 Points 2k badge 2x thumb
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
Photo of Jaclyn Schoof

Jaclyn Schoof, Community Manager

  • 5,092 Points 5k badge 2x thumb
Thank you for letting us know, we will work on this and update you when we have something!