In general Global Streams are data objects embedded in Classes / Tables. Using and viewing them with SQL is normally a part of the access to the containing tables.
During debugging or searching for strange or unexpected behavior there could be the need to get closer to the stored stream. No big problem with direct access to Globals with SMP or Terminal. But with SQL you are lost. So my tool provides dynamic access to Global Streams wherever you may need this Special thanks to @Oliver Wilms for the inspiration for this tool.
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
loading an already existing %Dyamic object or Array into a global of your choice
loading a %Stream containing a JSON object into a global of your choice
loading an external File containing a JSON object into a global of your choice
There is not just one class in this package: rcc.gstream.cls but also rcc.gstreamT.cls
While rcc.gstream works with direct access to the stream globals, the *T version uses a Process Private Global (PPG) as Temporary storage. using SELECT * FROM RCC.gstreamT WHERE RCC.useT('^jpgS')=1 and similar.
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:
Step 1 : Introduction to Python Flask Web Framework
Step 2 : Installation of Flask module
Step 3 : Creation of web application using Flask
Step 4 : Use of HTML Templates
Step 5 : Installation of IRIS Python Native module
Step 6 : Establishment of a connection with IRIS
Step 7 : Transferring data from IRIS to Flask and displaying it
So Let's start with step 1
Step1-Introduction to Python Flask Web Framework
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.
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!
M:N Relationship is a recurring object of my interest for a long time. So the subject turns up with me repeatedly. For this article, I found a nice example with TWO separate M:N relationships. Some M:N².
It is not pure fiction but taken from a closer view of OEX Contests that we run on a regular base.
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.
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
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.
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. Efficient refers to the structure created. Only Globals nodes containing data are presented in the generated JSON object.
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.
In my article I described the work using iris.gref . As the official documetation is rather slim on the subject it was necessary to dig into it. Using the power of Python I was able to detect what I needed but was hidden. I decided to share this with you. pydoc did the magic.
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
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.
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.
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?
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.
I'd like to share with you some storage features that also exist in Caché but are almost unknown and mostly not used. They are of course available in IRIS and gain importance with large and distributed storage architectures.
At the heart of IRIS and Cache is a very interesting database architecture that we, at M/Gateway Developments, refer to as "Global Storage". If you ever wanted to know more about the fundamentals and capabilities of this underlying database, you might want to read a major analysis we've put together: