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.
Globals are multidimensional sparse arrays which are stored in InterSystems Data Platform. Everything in InterSystems Products is stored in Globals: Classes, Tables, Documents, Code.
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.
As noted in the previous article Native API has some limits.
So I did some research on a more Terminal-like interface that
provides me with access like a console or the IRIS terminal
to allow my $QUERY over a global and other nice commands
that are not supported/mapped in NativeAPI for ObjectScript.
The basic tools are well-prepared and available.
There is just no method CommandLine and some already prepared code is neede
This question originally appeared in the comments of the post: Download globals from a particular server
This article was inspired by a recent question from @Evgeny Shvarov
Download globals from a particular server
It is not a click-and-run code but a draft that requires adjustments for your special needs
you have to add
If nothing than th
Hi,
We have a global with 65 million entries. All we are doing is just iterating through each entry to find out the total no of entries. It is currently taking 110 minutes. Is this something normal? What can we do to speed up this process? Below is the program for just iterating each entry in the global.
s sub=" ,count=0
f{
s sub=$o(^YYY(sub)) q:sub=""
s count= count +1
}
w!, "Total Count:"_ count
You can search for a specific global variable in the journal file using the ByTimeReverseOrder query of the %SYS.Journal.File class and the List query of the %SYS.Journal.Record class.
The role of each query is as follows.
A) %SYS.Journal.File query of the ByTimeReverseOrder class
You can get the journal file name. Results are returned in descending order of journal file name.
USER>set stmt=##class(%SQL.Statement).%New()
USER>set status=stmt.%PrepareClassQuery("%SYS.Journal.File","ByTimeReverseOrder")
USER>set rs=stmt.%Execute()
USER>while rs.%Next() { wrInterSystems IRIS currently limits classes to 999 properties.
But what to do if you need to store more data per object?
This article would answer this question (with the additional cameo of Community Python Gateway and how you can transfer wide datasets into Python).
The answer is very simple actually - InterSystems IRIS currently limits classes to 999 properties, but not to 999 primitives. The property in InterSystems IRIS can be an object with 999 properties and so on - the limit can be easily disregarded.
How do I retrieve the name of the first GLOBAL from within the GLOBAL directory?
Should I use some syntax with $Order or $Query or is there another way?
I have created a global say ^myglobal and entered some data. I am storing the name of global in databases and fetching the name based on some criteria. I am getting "^myglobal" in return from databases but i am not able to fetch the data I stored in the global.
I tried set var = result.global which gives me "^myglobal" in var. Doing WRITE var will return "^myglobal" and not the data i stored in this global.
I want to fetch value from a global without being limited by the namespace. Is there any way of referencing the values from a global to a different namespace?
It can be obtained by using the Size query of the system-provided %SYS.GlobalQuery class.
See the sample code below for usage examples.
*Please check the class reference for specifying columns and parameters.
set dir="C:\intersystems\iris\mgr\user" // IRIS.DAT(or CACHE.DAT) folder
set rs = ##class(%ResultSet).%New("%SYS.GlobalQuery:Size")
do rs.Execute(dir) // You can also specify a mask with the 3d parameter
while (rs.Next()) {
set gname= rs.Get("Name") // global name
set gsize= rs.Get("Used MB") // global size (MB)
write gname," : ",gsize,!
}
My major interest is Working with Globals in Embedded Python.
So I checked the available official documentation.
#1 Introduction to Globals
an attempt of a generic description of what a global is. Pointing to
#2 A Closer Look at ObjectScript
But where is Embedded Python ?
Way down you see
3.1 Embedded Python Overview
3.1.1 Work with Globals
Great if you have never seen a Global before
Otherwise a shocking primitive example
3.2 Using Embedded Python
Last hope: >>> but there is just NOTHING visible.
This is more than just disappointing! Even IRIS Native API for Python is more det
We are trying to come up with huge DataStore which needs to store HIPAA transactions and Data getting partitioned with idkey - YYYYMM. Current Live data get inserted into current Month DB - HIPAA_202306. 10 years (Hipaa retention policy) old data is going to be sitting in to 120 DBs ( 201606_HIPAA, 201607... 202305) for historical audit legal compliance purposes.
Currently if we create Namespace we get 2 databases - CODEDB for routes/classes & DATADB for journals data.
In our requirement, Global mapping should point to 120 DataDbs. How would we Map/design this using Globals.
Really app
Hello,
I would like to get a list of all globals that have been read or written during a given context. In Portal, there are counters in dashboard that give the number of read/write to globals in general.
What I am looking for :
- some handler (eg: like $ZTRAP) that will be called everytime something is read/written to a global.
- to activate a "global log mode" in Portal that will dump some information to a file (like ^ISCSOAP for SOAP requests).
I understand this is something that can considerably slow down IRIS, but it's intended to be used only for debbuging and under no load.
As la
Dear experts,
Please, could you help me?
Im trying import a global:
ACB> K ^GlobalManualSend
ACB> D $System.OBJ.Load("C:\Users\BNAPC\GlobalManualSend.xml")
ACB> Set sc = ##class(%Studio.Project).InstallFromGbl("^GlobalManualSend","fv")
But is returning a error about version:
.png)
Please, could you help me about it?
Thank you.
I have a %GlobalBinaryStream object that I'm trying to save as a local file after being received through a SOAP Web Service.
To do this, I created a %Stream.FileBinary object and wanted to set where the stream copied to this object would be saved by using either the DefaultStreamDir() ClassMethod or the NewFileName() ClassMethod. However, the documentation isn't very helpful on how to use these ClassMethods.
Right now, I have the below code:
set localStream = ##class(%Stream.FileBinary).%New() set st = localStream.CopyFromAndSave(file) /// file is the %GlobalBinaryStreamObject $$$QuitOnEr
During a migration from a rather old Caché Version (2016.1) to IRIS
I met the problem to migrate Streams.
The difference in the storage Global is minimal
It's not a big effort to do it manually for a few streams.
But for some thousand streams I hope there is a tool already available.
But where?
We are migrating to new servers, and I need to copy the information from Business Partner's over to the new server. Is this information in a Global or SQL table somewhere that I can export and import into the new IRIS environment?
Thanks
Scott
During my last migration to IRIS I met this Compatibility parameter
0 - Throw error when referencing a null subscript. 1 - Null subscript references do not throw an error.
The consequences are shocking. This was allowed:
USER>zw^rcc^rcc=0^rcc("")="***"^rcc("",1)="*,1"^rcc(1,"")="1,*"^rcc(1,2)="1,2"^rcc(1,2,"")="1,2,*"But SMP had no idea what is going on. .png)
And after switching off that flag this was still partialy visible, but read-only
USER>zw^rcc^rcc=0^rcc(1,"")="1,*"^rcc(1,2)="1,2"^rcc(1,2,"")="1,2,*"I just don't understand.
I know this problem something to do with sort and collation and string comparison vs numeric only strings, but I can't fathom out the details of it.
I have the following global, where all values are suffixed with a space, I believe the intention is to prevent empty strings and force string comparisons rather than numeric. Which is fine when searching for an exact match, so searching for "ABC" internally looks for "ABC ", or "800999" looks for "800999 ". However one function tries to search for strings containing, (specifically beginning with), a partial code. So in the below data the example
.png)
The Art of Mapping Globals to Classes 1 of 3
Looking to breathe new life into an old MUMPS application? Follow these steps to map your existing globals to classes and expose all that beautiful data to Objects and SQL.
By following the simple steps in this article and the next two you will be able to map all but the craziest globals to Caché classes. For the crazy ones I will put up a zip file of different mappings I have collected over the years. This is NOT for new data; if you don’t already have existing global please just use the default storage.
If you still can’t make heads or tai

Out of curiosity, I was looking in ^ROUTINE global to see how routines are stored internally.
I found out that lot of nodes are displaying "~pointer" as associated value (eg: instead of a string).
What are those pointers ? My guess is that it references some cache internal structure (eg: some nodes inside a B-Tree).
Is there a easily way to see what is behind ? Are pointers useful for user globals or is this something purely internal to Cache database ?
The power of the presented tool becomes visible with a large JSON file.
The example I have prepared is composed of the daily results of AoC 2023.
Anonymization makes it usable for demo purposes.
The similarity between JSON objects + arrays and Globals in IRIS or Caché is evident.
With small and medium size JSON objects navigation across %Dynamic Objects is comfortable.
But with large and/or deep cascaded objects it becomes a challenge.
The presented tool offers 3 variants
I have noticed that the way the nodes are ordered is different between 2 different environments.
If I create the following global :
set^TEMP("Z")=1set^TEMP("Ä")=1Then I dump it with zwrite, I get this (which is expected):
^TEMP("Z")=1^TEMP("Ä")=1However, on another machine, it gives me this :
^TEMP("Ä")=1^TEMP("Z")=1The same goes for the following command (which return 0 or 1, depending environment) :
write"Z"]]"Ä"Both are running Windows 10, but one is running IRIS 2021.1, the other CACHE 2017.2.2.
I don't think that's the reason, maybe there's something else (a config
Hello community,
is there anything special to consider when running a foundation production regarding purge jobs (Ens.Util.Tasks.Purge)? I am thinking specifically of the QuickStreams, which according to my information are stored in a temporary database until the system is restarted. Since a system reboot is much less frequent then the purges, I wonder what happens to the QuickStreams whose messages and headers have already been purged. Is there a way to view Quickstreams (not content, but rather metadata) e.g. via the Management Portal?
Thanks for your comments and hints,
best regards, Mar
Hi Devs!
Is there a way to get a Global that contains pesistence data for a class?
In early versions of IRIS it was classname_"D", like ^Sample.PersonD. Now, at least in IRIS 2022.1 it is something random.
Hi, devs!
Consider you have an arbitrary global with an unknown amount of indexes.
How to print all the values to the terminal with Embedded Python?
Hi folks!
I'm working with a global via Embedded Python as a class method. I init the handler for a global via:
gl=iris.gref("^Global")What is the way to check the value at index ^Global("x","y")? E.g.:
In ObjectScript I'd do the following:
set result=$data(^Global("x","y"))How do I do the same in Embedded Python?
I checked the documentation, but haven't found an answer.
Hi Community,
In this article, I will introduce Python Flask Web Framework. Together we will create a minimal web application to connect to IRIS and get data from it.
Below you can find the steps we will need to follow:
So Let's start with step 1
Flask is a small and lightweight Python web framework that provides useful tools and features that make creating web applications in Python easier. It gives developers flexibility and is a more accessible framework for new developers since it allows to build a web application quickly using only a single Python file. Flask is also extensible and doesn’t requires a particular directory structure or complicated boilerplate code before getting started.
For more details please view Flask Documentations.png)
Hello All,
I have a class method on the DocRepo server that needs to query the data value of a global variable on the Edge server.
I have looked at the documentation for 'Global Structure,' but I didn't find anything that helped.
Global Structure | Using Globals | InterSystems IRIS Data Platform 2022.1
I am able to access this global easily from the Edge server using the $Get function, but I need to access it from the DocRepo server.
Any suggestions would be greatly appreciated!
Thanks!
Craig