Pivot variables deployment
Hi!
How do you guys deploy DeepSee pivot variables?
Haven't found it in documentation.
Thank you in advance!
Comments
I export/import ^DeepSee.Variables global.
Thank you, Eduard!
But how do you manage it (the global) in CVS?
And what is the Installer script in case of a global?
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
}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: ^rccthe 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?…
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.