#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 Yuri Marx · Aug 8, 2022 24m read

In this article you will have access to the curated base of articles from the InterSystems Developer Community of the most relevant topics to learning InterSystems IRIS. Find top published articles ranked by Machine Learning, Embedded Python, JSON, API and REST Applications, Manage and Configure InterSystems Environments, Docker and Cloud, VSCode, SQL, Analytics/BI, Globals, Security, DevOps, Interoperability, Native API. Learn and Enjoy!

Machine Learning

Machine Learning is a mandatory technology to build advanced data analysis and automate manual activities with excellent efficiency. It

6
7 1159
Question Mark OReilly · Jul 4, 2022

Hi there have been various posts around how to clean up globals without parent data but none have gone into how you solve these issues. 

Our database is approaching 600gb in size so i am looking into how to reduce this. 

We use standard purge tasks. 

Our cache stream class has a global size of 2463243 from running global size so it is what i would like to tackle first. 

1) is there any way i can find based on my oldest message session for where most of these globals 

2) in the class where these are created what can be done to ensure purping. Basically we have 

set sIn=##class(%GlobalBin

3
1 954
Article José Pereira · Apr 5, 2022 4m read

Motivation

This project was thought of when I was thinking of how to let Python code deal naturally with the scalable storage and efficient retrieving mechanism given by IRIS globals, through Embedded Python.

My initial idea was to create a kind of Python dictionary implementation using globals, but soon I realized that I should deal with object abstraction first.

So, I started creating some Python classes that could wrap Python objects, storing and retrieving their data in globals, i.e., serializing and deserializing Python objects in IRIS globals.

How does it work?

Like ObjectScript%Dispatc

1
1 2371
Question Jonathan Wald · May 25, 2022

I am creating "models" that contain rows in several class tables called Model, Path, Node.

So, model 19 includes 1 row in the Model table, 11 rows in the Path table, and 10 rows in the Node table. 

I'd like to write some utilities to "move" model 19 from one instance to another.

I found some old (maybe deprecated?) functionality, the %SYNC.Transporter, which seems to work.  I can write a SQL query to select the rows of interest, and export those record to a ,gof file.  I can create 3 of them (one file per class), and then on the target instance, I can import from the .gof into the same, pre

4
0 708
Article Robert Cemper · Mar 24, 2022 3m read

This package offers a utility to export an XLarge Global into a JSON object file and to show
or import it again. In a previous example, this all was processed in memory. But if this is a
large Global you may either experience <MAXSTRING> or an <STORE>  error
if the generated JSON structure exceeds available memory.
 


Academic refers to the structure created.

  • each node of the Global including the top node is represented as a JSON object
  • {"node":<node name>,"val":<value stored>,"sub":[<JSON array of subscript objects>]}
  • value and subscript are optional but one of them always exists for a val





sad

1
0 450
Article Yuri Marx · Apr 4, 2022 12m read

  

Globals are the core of the InterSystems IRIS for data persistence. It is flexible, allowing store JSON documents, relational data, object oriented data, OLAP cubes and custom data models, like Mindmaps. To see how to store, delete and get mindmap data using globals, follow these steps:

1. Clone/git pull the repo into any local directory

$ git clone https://github.com/yurimarx/global-mindmap.git

2. Open a Docker terminal in this directory and run:

$ docker-compose build

3. Run the IRIS container:

$ docker-compose up -d

4. Go to http://localhost:3000 to use the Mindmap frontend and

2
1 537
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. Compact refers to the structure created.
Globals nodes are included with data for a fast data load.   
But also the related code is quite compact.

3
0 439
Announcement Anastasia Dyubaylo · Apr 7, 2022

Hi contestants!

Here are the results of the bonus collections the applications of the Globals Contest accomplished.

Here are the projects that scored it:<--break->

Project

Data-model implementation

Functional index implementation

Data Move usage

Embedded Python

Docker

ZPM

Online Demo

First Article on DC

Second Article on DC

Code Quality

Video on YouTube

Total Bonus

Nominal 5 5 3 4 2 2 2 2 1 1 3 30
Globals: Embedded Python vs. ObjectScript       4 2 2 2 2   1   13
GlobalToJSON-Compact      

5
0 345
Article Lorenzo Scalese · Apr 4, 2022 6m read

Hi Community,

This article describes the small ZPM module global-archiver.
The goal is to move a part of a global from a database to another database.

Why this package?

A typical use case is read-only data sequentially added to your database that you can never delete.
For example:

  • User log access to patient medical data.
  • Medical documents versioning.

Depending on the intensive usage of your application, these data could highly increase your database size.
To reduce the backup time, it could be interesting to move these data to a database dedicated to the archive and make a backup of this dat





schema-01

5
0 387
Announcement Evgeny Shvarov · Mar 21, 2022

Hi Developers!

Here're the technology bonuses for the InterSystems IRIS Globals Contest 2022 that will give you extra points in the voting:

  • Data-model implementation - 5
  • Functional index implementation - 5
  • Data Move usage - 3
  • Embedded Python - 4
  • Docker container usage - 2 
  • ZPM Package deployment - 2
  • Online Demo - 2
  • First Article on Developer Community - 2
  • Second Article On DC - 1
  • Code Quality pass - 1
  • Video on YouTube - 3

See the details below.<--break-><--break->

2
0 388
Announcement Anastasia Dyubaylo · Mar 18, 2022

Hi Community,

We are pleased to invite all the developers to the upcoming InterSystems Globals Contest Kick-off Webinar! The topic of this webinar is dedicated to the Globals contest.

In this webinar, we’ll show you how to deal with Globals to implement different data models and sophisticated indexes. As always, our experts will answer the questions on how to develop, build, and deploy Globals solutions using InterSystems IRIS.

Date & Time: Monday, March 21 – 11:00 AM EDT

Speakers:  
🗣 ​​​@Daniel Kutac, Senior Sales Engineer
🗣 @Joel Solon, Senior Technical Trainer
🗣 @Timothy Leavitt, Development Manager 
🗣 @Evgeny Shvarov, InterSystems Developer Ecosystem Manager

3
0 386
Article Robert Cemper · Mar 19, 2022 2m read

This example demonstrates the difference you may experience when you write to
Gllobals directly from Embedded Python compared to native ObjectScript.

To make this demo useful I start 2 background jobs that simply write sequentially
to a dedicated global. A common control method signals for a synchronous start.
Similar a common stop & view interrupts data feeding.

That's the principle process:

  

As 2 jobs run in parallel the probability of just using sequential blocks is reduced.
During the development of this demo, I detected that the JOB command has problems
with ClassMethods in Embedded Py

1
0 268
Question Niklas Thilmont · Mar 14, 2022

Hey InterSystems Community!
This is probably far-fetched - is there a way to get notified/get a piece of code triggered whenever the state of a global changes?

Now what could I possibly want with that? Quite simple! I would like to forward the content of a global (in this case the "FSLog" global written by the FHIR implementation) while adding timestamps to it - to create some sort of file-based logging for it.

9
0 371
Question Peter Stordiau · Feb 20, 2022

Dear people,

I (really) spent hours on finding the maximum size a Global is allowed to be (for Windows, if that matters). All I seem to run into are database sizes (derived from a max number of blocks and block size), but I refuse to believe that is correct because too small to be realistic. surprise 

It will  undoubtedly my fault that I don't understand or misread the concepts of "database" vs Globals, envisioning files as such while one set of functional Globals in one file (?!) could comprise of a database, hence it is one file after all, that file (block structure) not able to be larger than 17G

11
0 862
Discussion Sylvain Guilbaud · Feb 21, 2022

Let's consider you would like to efficiently store your historical data in a similar structure than the one used for your current data, but without sharing the same physical storage (ie : not in the same global). What is the most efficient way to do it ?

Below a simple class of your current data : 


Class data.current.person Extends (%Persistent, %Populate)
{

Parameter DEFAULTGLOBAL = "^on.person";

Property name As %String;

Property dob As %Date(FORMAT = 4);

Property activ As %Boolean [ InitialExpression = 1 ];

Property created As %TimeStamp [ InitialExpression = {$zdt($h,3)} ];

Storage Def
9
0 515
Article Evgeny Shvarov · Feb 19, 2022 2m read

Hi developers!

As you probably noticed in IRIS 2021 the names of globals are random.

And if you create IRIS classes with DDL and want to be sure what global was created you probably would want to provide a name.

And indeed you can do it. 

Use WITH %CLASSPARAMETER DEFAULTGLOBAL='^GLobalName' in CREATE Table to make it work. Documentation. See the example below:

11
0 706
Article Evgeny Shvarov · Feb 19, 2022 2m read

Hey developers!

Sometimes we need to insert or refer to the data of classes directly in globals.

And maybe a lot of you expect that data structure of global with records is:

^Sample.Person(Id)=$listbuild("",col1,col2,...,coln).

And this article is a heads up, that this is not always true, don't expect it as granted!

1
0 482
Article Robert Cemper · Feb 8, 2022 1m read

I have created a package to export a Global into JSON object file and to re-create it by reloading from this file   
embeddedPython refers to the new available technologies. It should be understood as a learning exercise of 
how to handle the language interfaces. Only Global nodes containing data are presented in the generated JSON file.
Differently from the previous example, this one is using embedded Python only, no ObjectScript. Therefore PURE

2
0 663