Download globals from a particular server
Hi developers!
Could you please advice what is the easiest way to download globals from a particular server?
I have the access to it, I know which globals I need to download/copy (5-7 globals per name). This is to perform then analysis in IRIS BI.
Setting up a DR Async Mirror in this case is not an option (but is a usual way to do things).
I think of setting up a REST which I call and get the global in JSON back. Is it too crazy? :)
I remember that previously we had an option of REMOTE Mounting - that'd be great. I could run a few merges and that's it. But don't see how to perform it with IRIS.
Any thoughts?
Comments
My First Choice:
- use ECP to mount a Remote DB.
- copy the Globals
My 4rd Choice:
- as you have access export the Global to a file
- copy the file using SSCP
This needs a commercial license, but seems as a working approach.
My Second Choice:
- connect to the server over SQLgateway (Odbc, Jdbc).
- use Global Dump to SQL
My 3rd Choice:
- get a network file connection to the source DB
- mount the DB over the network as remote drive
mixing file systems Win / *UX might be tricky
My 5th Choice:
- use Native API for ObjectScript for access.
- especially %Net.DB.Iris
I see Get method there, but I think it will be to expensive to "get" all the nodes via network.
Maybe I could use some system classes and run a method to read from a global? Any ideas of such a system class and method? Anything Stream related?
you may run an export ^%G like on the remote server and then copy somehow the result
It's an orgy of IsDefined ($DATA) and GetNext( $ORDER) as equivalent of $QUERY is not implemented
example moved here Remote Global Listing using NativeAPI for ObjectScript #1
My #1 choice would be:
- go to Management Portal -> Globals
- select globals as needed
- choose Export, then select browser instead of server
- then the .gof file will be downloaded to your local filesystem.
.png)
I was thinking the same thing .. kudos for the screenshot :)
Thanks Alex! This works of course, but I need to do the same on a regular manner. So I'm looking for a way to perform the same procedure programmatically
I have a follow up question: in case I need to do it "by hand" - what is the way to create a CSP class(URL) that once I open it it will download me a global I want in XML format? If anyone has an example how to manage the thing?
Not a ready-to-use solution, but a way to take
- export the global by SMP or embed %system.OBJ.Export to create *.XML file
- download it using <a href="~file_location~" download> explanation
Thanks! Will take a look!
Here is a working simple example to start with
https://community.intersystems.com/post/download-globals-xml-using-csp
with an OEX package