Is there an option to export globals in archive?
Hi, Community!
Is there an option to get an archived file of globals in one command. Say for:
Do $System.OBJ.Export("Class1*D.GBL,Class2*D.GBL","data_gbl.xml")
get something like:
Do $System.OBJ.Export("Data*D.GBL","data_gbl.gz","gzip")
And also to have the convenient one click way to import it to the namespace via terminal or Control Panel?
If anyone already has this module, share please?
It would be very convenient for import/export/continuous integration purposes cause globals can be really heavy.
Hi Evgeny,
Not exactly one command, but it can be done on one line...
This should work in reverse opening the file with the GZIP flag, read the contents to a temporary binary stream and then using the $System.OBJ.LoadStream on the temp binary stream.
Sean.
It can be done with Gzip stream directly:
Finally, have the following for globals export/import in gzip:
Don't you think that naming the file "1.xml.gz" would be more clear?
Dot would be unrequired and even misleading here.
You are right, no dot is needed here.
Thanks, Sean, Ed, Alexey!
That works perfectly! Ed, please add a dot to s in ExportToStream?
I'm using it in one line, and think would add in some "Dev.Utils" class to make it shorter.
BTW, kill ^dbg is not mandatory here, cause import from XML format everytime kills the global first.
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue