Written by

Senior Startups and Community Programs Manager at InterSystems Corporation
Question Evgeny Shvarov · Jul 28, 2016

Pivot variables deployment

Hi!

How do you guys deploy DeepSee pivot variables?

Haven't found it in documentation.

Thank you in advance!

Comments

Evgeny Shvarov  Jan 4, 2018 to Eduard Lebedyuk

Thank you, Eduard!

But how do you manage it (the global) in CVS? 

And what is the Installer script in case of a global?

0
Eduard Lebedyuk  Jan 4, 2018 to Evgeny Shvarov

Export it as XML. Store in VCS with code. Import with the rest of the code.

Other option is to store it as XData, here's sample code:

XData DisplayProperies
{
<Export generator="Cache">
<Global>
<Node><Sub>^Test</Sub>
<Node><Sub>1</Sub>
<Data>123</Data>
</Node>
<Node><Sub>Val2</Sub>
<Data>prop3</Data>
</Node>
<Node><Sub></Sub>
<Data>prop1</Data>
</Node>
</Node>
</Global>
</Export>
}

/// Set global
/// do ##class(Class.Installer).setGlobal()
ClassMethod setGlobal() As %Status
{
    #dim sc As %Status = $$$OK
    #dim className As %String = $classname()
    
    // search for XData: DisplayProperies
    #dim xdata As %Dictionary.CompiledXData = ##class(%Dictionary.CompiledXData).IDKEYOpen(className, "DisplayProperies",, .sc)
    quit:$$$ISERR(sc) sc

    set stream = xdata.Data
    set sc = $system.OBJ.LoadStream(stream, "/displaylog=0 /displayerror=0")
    quit sc
}
0
Robert Cemper · Jan 4, 2018

just run $System.OBJ.Export() for your Global and hand over the result to your CVS.

USER>s sc=$system.OBJ.Export("^rcc.GBL","exportTest.txt",,.error,"UTF8")
 
Exportieren in XML gestartet am 04/01/2018 10:25:26
Exportiere Global: ^rcc

the result is a nice XML structure

and $system.OBJ.Import()  reloads it  

The extension  .GBL is the important thing

http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?…

0
Evgeny Shvarov  Jan 5, 2018 to Robert Cemper

Hi, Robert!

Thanks for contributing the answer.

I like that approach as well! Was looking if there is something better).

P.S. I think "UTF8" is not mandatory, cause it is always UTF8 if you consider exporting a Global to XML.

0