#Globals

4 Followers · 231 Posts

Globals are multidimensional sparse arrays which are stored in InterSystems Data Platform. Everything in InterSystems Products is stored in Globals: Classes, Tables, Documents, Code.

Documentation.

Article Robert Cemper · Jan 24, 2022 1m read

I have created a package that offers a utility to load a Global into JSON object and reverse     
to create a Global from this type of JSON object. Academic refers to the structure created.
Each logical node of the Global is presented separately with all its descendants.
Even if they don't contain any stored data.

1
0 390
Article Jose-Tomas Salvador · Nov 9, 2021 3m read

For some years I missed being able to offer, to everybody interested in ObjectScript, a tutorial more or less complete, to start with ObjectScript. Something that could help more and make things easier to those new developers that come to our technology... something intermediate, halfway between the common "Hello World!", that doesn't really get you further, and the "Advanced Training", that is unaffordable because of lack of time,etc.

If there were something truly helpful not only as an introduction to the ecosystem, but as a starting point, as a boost, to really start to walk into ObjectScript and move forward by yourself... wouldn't that be awesome?

7
1 871
Article Rob Tweed · Dec 20, 2021 1m read

For those of you who might be new to IRIS, and even those who have used Cache or IRIS for some time but want to explore beyond its usually-assumed boundaries and practices, you might want to dive into this detailed exploration of the database engine that is at its heart, and discover just what you can really do with it, going way beyond what InterSystems have done with it for you. 

You'll discover that it's actually a hugely powerful yet incredibly simple storage engine that allows you to model any kind of database you wish, once you understand and master its simple, basic principles. Its sto

5
4 545
Question Bharathsimha Reddy Jakka · Sep 27, 2021

How to find a global's original namespace ? Potentially mapped from a different namespace .

I have a global ^Custom that exists in multiple namespaces but it could mapped from namespace Drone(A) to Launch(B)

Without access to Cache management portal how to find where is my global located using cache code ?

Like if ^Custom == ^[Drone]Custom ??

5
0 484
Question Guilherme Koerber · Sep 9, 2021

Hello community!

I'm facing a base growth issue, which is being generated by a process and an Ensemble feature.

When executing the process of cleaning up the message queues, the Ensemble “preserves” the Streams that were part of these messages, deleting only the Header and Body. In this way the database (of one of the namespaces) has grown around 60GB per day, which has been maxing out the disk capacity.

InterSystems informed that this is a characteristic and that it is explained in the documents mentioned below.

https://community.intersystems.com/post/ensemble-orphaned-messages

And also

2
0 1049
Question Norman W. Freeman · Aug 27, 2021

In Caché, it's possible to iterate a local array using $QUERY() :

set a("foo") = 50
set a("bar") = 30

set key = "a"
for
{
     set key = $QUERY(@key)
     quit:key="" 
     write key_" = "_@key
}

This code works perfectly, unless it's called in a job (eg: a routine called by the JOB command).

In that case, $QUERY will return an empty string. It's like the array cannot be referenced anymore by simply using it's name.
It works using $ORDER(a("")) but I would like to use $QUERY if possible (because my array has several dimensions and it would require several for loops).

3
1 464
Article Yuri Marx · Mar 1, 2021 3m read

I'm participating in the Developing with InterSystems Objects and SQL with Joel Solon. The course is very nice and I will share with you some tips I got during the training. Tips presented in the day 4:

  1. All data are stored in Globals and Global names start with ^. Example of global: ^animal. Global can have multiples locations to the data ("sub data"). Example: ^animal(1).
  2. ^%* globals are accessible from any system-wide (from any namespace).
  3. Globals enables IRIS to support multimodel data (object, relational, document, multidimensional, etc).
  4. To see globals go the Management Portal > Exp
12
2 652
Article Renato Banzai · Jan 30, 2021 3m read

Making a blog using Python + IRIS Globals

Since I started to use internet (late 90's), I always had a CMS (content management system) present to make easier post any information in a blog, social media or even an enterprise page. And later years putting all my code into github I used to document it on a markdown file. Observing how easy could be persisting data into Intersystems IRIS with the Native API I decided to make this application and force myself to forget a little of SQL and stay open to key-value database model.

picture

What is a blog?

It is the short name of WEB LOG, essentialy a platform


2
0 476
Article Rob Tweed · Jan 26, 2021 2m read

I've posted this video on YouTube:

https://www.youtube.com/watch?v=gHUifpuav9I

Expand this article for some background to what it shows and what it's all about...

I've submitted what I've called qewd-jsdb-kit-iris to the Multi-model competition - it's a suite of applications and tutorials that demonstrate how IRIS Global Storage is used to provide the unique Node.js-based "persistent JavaScript Objects" of QEWD-JSdb (what I refer to as the JavaScript equivalent of the ^ symbol that distinguishes Global data storage from in-memory data).  However, something that you can use alongside the tut

2
0 309
Announcement Evgeny Shvarov · Jan 11, 2021

Hi Developers!

Here're the technology bonuses for the InterSystems Multi-Model Contest that will give you extra points in the voting:

  • InterSystems Globals (key-value)
  • InterSystems SQL
  • InterSystems Objects 
  • Your data model
  • ZPM Package deployment
  • Docker container usage

See the details below.<--break->

3
1 319
Article Evgeny Shvarov · Jan 24, 2021 2m read

Hi developers!

Often we need to deploy some data along with code pieces of the application.

And for InterSystems IRIS developers the question could sound: "How can I deploy the data I have in globals?"

InterSystems IRIS Globals Model QuickStart | InterSystems

Here I want to suggest to you one of the approaches - deploying global data using the ZPM package manager.

0
0 504
Question Keith Davis · May 14, 2019

I am trying to create an ODBC class that includes all of these as records, but I don't see how I can since the first record has 3 subscripts, the rest have 4 subscripts:

Here is my current storage definition:

<Storage name="Test">
<ExtentSize>100000</ExtentSize>
<SequenceNumber>25</SequenceNumber>
<SQLMap name="Test">
<Data name="ModificationDate">
<RetrievalCodeset {ModificationDate}={L4}</RetrievalCode>
</Data>
<Data name="Operator">
<Delimiter>":","|"</Delimiter>
<Piece>36,2</Piece>
</Data>
<Data name="CreationDate">
<Delimiter>":",","</Delimiter>
<Piece>24,1</Piece>
</Data>
<Data name="Creation

12
0 968
Question Ahmad Bukhtiar · Dec 5, 2020

Hi, we suddenly noticed that one of the edge storage increased by 30% and it was due to ERROR globals which was throwing repeated error for 7 days and it consumed 35GB space. Is there a way to log the storage of edge production on daily basis and compare the increase in storage with previous day and if increase is 5% more than trigger an email to system admit to look why the storage increased suddenly. 

3
0 350
Question Daniel Aguilar · Nov 4, 2020

Good Morning,

I have this question for a long time. When I make an insert by SQL from an external application in the fields of type %String, if they are empty, it writes the character $c(0) in the global.

Is there a way so that if an Insert is received in a field of type% String with null value instead of the $ c (0) it leaves it empty?:

I have the class defined like this:

Class User.MiClase Extends (% Persistent,% XML.Adaptor)

and the property like this:

Property myProperty As% String;

I have tried creating a trigger or setting default values but it doesn't work.

Trigger DespuesI

7
0 1253
Question Norman W. Freeman · Oct 1, 2020

If a global node contains special characters, (eg : a line returns), it will be displayed like this in Portal ("System > Globals > View Global Data" panel) :

^A(1) = "this is"_$c(13,10)_"a test"

I would like to export global data to a txt file using a similar format.

I already wrote the main code (that loops on all nodes and dump them to file), the problem is how to handle special characters.
For the moment I replace them manually one by one. It works, but it's far from perfect :

set text = ... //get global data
set text = $replace(text,"""","""""") //double the quotes
set text = $replace
5
0 2019
Question ED Coder · Sep 17, 2020

From my recent post, I uploaded a set of values into a global, and I am trying to compare the first field, and then

$GLOBAL("123", "bone issue")=""

$GLOBAL("234","joint issue")=""

Now, I want to compare and see if the DG1:4.1 segment has the code $GLOBAL and then replace the DG14.1 segment with the code and the description

so For Eg: if DG1:4.1 exists in $GLOBAL("123") then replace the segment with the code and description

Can someone guide me on how I can achieve this?

4
0 279
Question Julian Pardoe · Aug 3, 2020

I have a number of globals I want to loop through depending on a passed in string...

^A("SYSTEM")

^B("SYSTEM")

^C("SYSTEM")

^D("SYSTEM")

^E("SYSTEM")

I am passing in a string of "A:C:D"

Piecing that to pull out A,C,D, then want to use that to pull out A,C,D from above, but having problems setting the name of the global to be the name of the variable I have pulled out of the string

How do I set this?

I have tried ^varname("SYSTEM")

also tried setting a variable to have the value "^varname" and using that

Thanks

3
0 649
Question Muni Ganesh · Aug 1, 2020

Hi,

We are using CACHE 2017.2.1, I would like to retrieve data from Journal for killed global. Let say we have global name ^ EMP(123) with data and also have some child nodes and it has been killed by using cache kill command for some reason and we don't know who has executed this and when. My questions are below.

1) Can we get back the data of killed global from journal files,Is it possible or not ?

2) If above question is Yes, then how to find that specific journal file, which has the global which has been killed?. I am assuming do we have to search journal files created on that date or d

5
0 802
Question Daniel Lee · Aug 20, 2020

We are using Ensemble and I added some debug logging that writes to a global and recompiled the class in Studio. However, when we send messages, the global is not populated. I have recompiled, removing the checkmark to keep the generated code so that there is only one .INT file and I verified that the code is present in the .INT file. 

My question is, do we need to stop and restart the Ensemble production in order for these changes to take effect? Do I need to stop and restart the business operation that calls this piece of code? Is there something else I may have missed?

Below is the code s





6
0 413
Question Florian Hansmann · Aug 3, 2020

Hello Intersystems-Community,

I build an API and there I use $order to get the Data from my Globals.
When I first time use that API it's get an error (504 Gateway-Timout > 60 Sec.).

After 2 reloads it works with a loading time of 2 Sec.! Sounds for me like the $order is cached and it works faster. Is it true $order will be cached?

When it works, I only get the error at the next day. So it's very hard to reproduce that error. Is it possible to delete the cache for $order?

Example:

        set a = ""
        for {
            set a = $order(^SD031S("0","7",x,a))
            if (a = "")
8
0 523
Article Renato Banzai · Jun 2, 2020 4m read

picture

Globals as a Graph Data Structure in Python

How to use the IRIS Native API + Python to see globals as a Graph Network Chart.

Iris Globals

Reading the documentation these topics are related to globals:

  • A global consists of a set of nodes (in some cases, only one node), identified by subscripts.
  • Each node can contain a value.
  • ObjectScript includes functions to iterate through the nodes of a global and quickly access values.
  • A global is automatically stored in the database. When you assign a value to a node of a global variable, the data is written immediately to the database. - You can see the
4
1 601