0 Followers · 11 Posts

A graph database is a database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data. 

Learn more on graph databases.

InterSystems Data Platform can support graph database storage because of its multi-model nature.

Question Elisa Pischedda · Nov 11, 2025

Hi everyone, on HealthShare Unified Care Record 2024.1.0 Build, we're using the Analytics section to create a dashboard containing a time chart showing a cumulative curve of the number of documents indexed in the registry for each documentSource of each repository. We tried the following steps: we created a cube whose dimensions are the CreationDate, SourceValue, and repositoryUniqueID of the HS_Registry.Document table; in the Analytics section, we created a pivot table that lists the document creation date on each row, along with as many columns as each repository's documentSources. However,

4
0 35
Question Georgia Gans · Aug 11, 2025

Hi everyone,

I am trying to create a treeMapChart in IRIS BI that will then be displayed on my DeepSeeWeb dashboard. In the IRIS BI User Portal, this is an example of what my treeMapChart looks like:

I know there is a huge amount of rectangles in this graphic - I care most about the common components (the largest boxes) but I still want all of the boxes to show. However, it projects to my DeepSeeWeb dashboard as the following: 

7
0 90
InterSystems Official Thomas Dyar · Oct 3, 2024

We've recently made available a new version of InterSystems IRIS in the Vector Search Early Access Program, featuring a new Approximate Nearest Neighbor index based upon the Hierarchical Navigable Small World (HNSW) indexing algorithm. This addition allows for highly efficient, approximate nearest-neighbor searches over large vector datasets, dramatically improving query performance and scalability.

1
1 290
Article Ariel Glikman · Jun 3, 2024 7m read

Graphical Display of Tables

Here we will document how you can get the results of your Data Collection to be displayed graphically. The output of your project will look like this:

image

Note that I am working on a local machine. If you are doing this on a server then be aware to use the correct IP address.

First, we will import the three classes from the that we are going to need (note that we will edit them later):

You can take the xml and import it to your system.

The spec will actually create the dispatch class and implementation template. If you're interested in learning more about this process check out my colleague's, Eduard Lebedyuk's, great article.

Set up the APIs

Note that in this demo we will be using Basic Authorization. We also assume that there is already data in the Sample_DBExpansion_Data.DBAnalysisInfo and Sample_DBExpansion_Data.GlobalAnalysisInfo tables. If there isn't then go back to Data Collection and get some data.

  1. Let's first create an endpoint which will give us access to our data: image

Fill in the same names unless you plan to customize the code for the react app on your own.

  1. Click save and let's test our APIs. Open up postman, and send the following request (make sure you use the proper authorization): image

Our output should look something like this:

{
    "data": [
        {
            "Name": "c:\\intersystems\\irishealth\\mgr\\training\\",
            "Date": "2023-04-30 15:23:58",
            "DBUsedSize": 2010,
            "DBAllocSize": 2060
        },
        {
            "Name": "c:\\intersystems\\irishealth\\mgr\\training\\",
            "Date": "2023-05-01 09:01:42",
            "DBUsedSize": 2010,
            "DBAllocSize": 2060
        },
        {
            "Name": "c:\\intersystems\\irishealth\\mgr\\training\\",
            "Date": "2023-05-03 13:57:40",
            "DBUsedSize": 150,
            "DBAllocSize": 2060
        }
    ]
}

Next let's send a GET request to http://localhost:52776/Sample/dbAnalysis/globals/all. Check that your response gives you a list of globals who's information looks like this: (note that the name will default to the class name if the global has one)

        {
            "Name": "someName.cls",
            "UsedMB": 4.2,
            "AllocatedMB": 5.7
        }

Now let's test a specific global, say Errors. Send a GET request http://localhost:52776/Sample/dbAnalysis/global/Errors. Check that your output is similar to this:

        {
            "Name": "ERRORS",
            "UsedMB": 0.4,
            "Date": "2023-04-30 15:23:58",
            "AllocatedMB": 0.45
        },
        {
            "Name": "ERRORS",
            "UsedMB": 0.43,
            "Date": "2023-05-01 09:01:42",
            "AllocatedMB": 0.49
        },
        {
            "Name": "ERRORS",
            "UsedMB": 0.1,
            "Date": "2023-05-03 13:57:40",
            "AllocatedMB": 0.13
        }

And finally, let's send a GET request to http://localhost:52776/Sample/dbAnalysis/globals/table/1000 This will give us the growth of globals, who's output we will channel into the 'Tabled Data' section of the react-app. Note that the 1000 is just referring to how many days back we should go. This is entirely up to you. Feel free to customize this in the src/components/TableInputBar.js file. Note the <Table timeBack={1000} numGlobals={searchInput}/>. Put in to here however many days you wish to see back on the react app.

You should get a response that is a list of objects like this one:

       {
            "Name": "nameOfGlobal",
            "ClassName": "AriTesting.DemoTableElad.cls",
            "OldMB": 0.14,
            "OldDate": "2023-04-30 15:23:58",
            "NewMB": 0.14,
            "NewDate": "2023-05-03 13:57:40",
            "Change": "0"
        }

Since all our requests were in order we can now create our web app. Note that if you were not getting the responses you were expecting then you should go back and see what is wrong, before moving on and creating the app that depends on them.

Steps For Creating the Web App

  1. The first thing you will do is create a generic react app. Note that you will need to have node (at least version 14) installed on the local development machine, however you will not need it on the server. If you don't have it installed, do so here. If you are not sure if you have it installed you can run this command from your terminal:
node --version
  1. Let's now install a generic react app, and we will change the parts that we will need to. This is as simple as running:
npx create-react-app data-collection-graphs
  1. If this is your first time doing this it may take a few minutes. Once it is done we will have a folder that looks as follows: image

  2. Your generic (we will customize it) react-app is now working. Check it out:

npm start

You should automatically be redirected to a tab that shows you the following (if not, go to http://localhost:3000/): image

  1. Now let's customize for our needs. Stop your app from the terminal with ^C. Download the src folder in this repository and replace the one in your directory that was automatically created by our previous commands. From within the data-collection-graphs directory, install chart-js and react-chartjs-2 as follows:
npm install --save chart.js
npm install --save react-chartjs-2

In the src/components folder there is the JavaScript code that is calling the API endpoints to obtain data for the graph. If your server is not running on localhost:80 then you should change the baseUrl (and base64 encoded basic authorization, if that's the authorization method you have chosen to use) in BarChart.js, DBChart.js, SingleGlobalHistoryChart.js, and TableData.js.

  1. Use npm start to load your page, and you should now get the page with your database analytics.

Note: You may notice a blank page and upon opening the web developer tools see that there is an error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:52775/Sample/dbAnalysis/globals/all. (Reason: CORS preflight response did not succeed). Status code: 404.

If this is the case then add the following class method into your generated Sample.DBExpansion.Util.REST.disp.cls:

ClassMethod OnHandleCorsRequest(pUrl As %String) As %Status
{
     //s ^CORS("OnHandleCorsRequest")="Handled"
     #; Get the origin
     Set tOrigin=$Get(%request.CgiEnvs("HTTP_ORIGIN"))
     #; Allow requested origin
     Do ..SetResponseHeaderIfEmpty("Access-Control-Allow-Origin",tOrigin)
     #; Set allow credentials to be true
     Do ..SetResponseHeaderIfEmpty("Access-Control-Allow-Credentials","true")
     #; Allow requested headers
     Set tHeaders=$Get(%request.CgiEnvs("HTTP_ACCESS_CONTROL_REQUEST_HEADERS"))
     Do ..SetResponseHeaderIfEmpty("Access-Control-Allow-Headers",tHeaders)
     #; Allow requested method
     Set tMethod=$Get(%request.CgiEnvs("HTTP_ACCESS_CONTROL_REQUEST_METHOD"))
     Do ..SetResponseHeaderIfEmpty("Access-Control-Allow-Method",tMethod)
     Return $$$OK
}

As we are not using delegated authentication here, the request will be performed by the CSPSystem user. This means that we must give the CSPSystem user the appropriate roles for the queries we are making. Read more about that here (or don't, and just give the CSPSystem user the role needed to read data from your namespace/database.)

With Cross-Origin Resource Sharing (CORS) configured, after refreshing the page, you should see the charts begin to populate and look like what we see at the top of this page.

Feel free to play around with the code and make improvements or customizations that would suit your organization best!

If you have any suggestions on how I can improve this from our end please let me know as well.

Continue onto the data analysis repo here.

0
2 266
Question Oliver Wilms · Jun 3, 2020

Hello,

I work on a dashboard. I understand basic html. I like to draw two boxes in different colors on the background. There will be multiple small boxes inside or over the boxes in the background. I defined the large boxes as <div> and the smaller boxes also as <div> inside the larger <div>. So far so good.

How can I draw lines with arrows between the smaller boxes?

9
0 452
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 contents of a global via an ObjectScript command or via the Management Portal.

A Python Way to See Globals

As one of representations of globals can be a Graph Data Structure there are some modules in Python that can transform these globals in a visualizable graph.

The Chart Application

Demo - Try it yourself

I have deployed the application as a demo here, my IRIS Database has one global to test ^computer: (http://iris-python-suite.eastus.cloudapp.azure.com/global-chart)

Into the code

Clone my repository to see all the code implementation.

$ git clone https://github.com/renatobanzai/iris-python-covid19.git

What did I use in Python

In this application environment I use Python 3.7 with these modules.

  • PyYAML==5.3.1
  • dash==1.12.0
  • plotly==4.7.1
  • networkx==2.4
  • numpy==1.18.4
  • dash-bootstrap-components==0.10.1
  • irisnative-1.0.0-cp34-abi3-linux_x86_64.whl

Project Structure

This project has a simple structure to be easy to understand. On the main folder we have 3 most important subfolders:

  • ./app: with all the application code and installing configuration.
  • ./iris: with the InterSystems IRIS dockerfile preparing to serve the application.
  • ./data: with the files from Johns Hopkins University to ingest and a YAML to change configuration outside the container environment by a volume

Application Structure

Now inside the ./app directory we can see some files:

  • __main__.py : with the implementation of the web application
  • iris_python_suite.py : a class performing all data transformation to convert the globals into a networkx graph.

Database Structure

This application uses Intersystems IRIS as a repository, the globals used are:

-^computer : A global to test the graph. If you want, you can test with all other globals default in the USER Namespace.

There are some other globals created by the application that can be used as a test too:

-^config : with some config data -^raw.covid19 : where the raw data (Source of Data) are ingested -^countrydetails : to get the population of each country -^end.date.deaths : to serve the chart requisitions and here is the goal, Its fast! -^end.timeless.deaths : to server another kind of chart requisition

App Structure

iris_python_suite.py: Inside this file are 2 classes that makes the job:

  • irisdomestic: Has the same features of irisnative + creates instances of irisglobalchart, irisglobal, etc (factory pattern)
  • irisglobalchart: Make a recursive track into the global, converting all the data in a Graph Networkx.

Why do I need to convert the Graph into a Networkx Object?

If are you asking yourself, the module networkx has a function position nodes using Fruchterman-Reingold force-directed algorithm.

Algorithm Fruch... WHAT?

As a graph can have any shape is too hard to represent it in a generic way. This is on algorithm to represent graphs without a lot of confusion.

The line that perform the use of this algorithm is on python_suite_global.py:

    def get_fig(self):
    _nx = self.obj_nx
    pos = nx.spring_layout(_nx)

Running the application by yourself

Prerequisites

  • git
  • docker and docker-compose
  • acess to a terminal in your environment

Steps

With docker-compose you can easily up one environment with all the pieces and configurations go to the iris-python-covid19 folder and type this:

$ docker compose build
$ docker compose up

Estimated time to up containers

1st time running will depend of your internet link to download the images and dependencies. If it last more than 15 minutes probably something goes wrong feel free to communicate here. After the 1st time running the next ones will perform better and take less then 2 minutes.

If is everything ok

After a while you can open your browser and go to the address:

http://localhost:8050/global-chart

You should look at IRIS Admin Portal

I'm using for now the USER namespace

http://localhost:9092
user: _SYSTEM
pass: theansweris42

If this article help you or you like the content please vote:

This application is at the current contest on open exchange, you can vote in my application iris-python-suite here(https://openexchange.intersystems.com/contest/current)

4
1 561
Article Nikita Savchenko · Jan 5, 2019 6m read

This article introduces InterSystems iKnow Entity Browser, a web application which allows to visualize extracted and organized text data mined from a large number of texts, powered by InterSystems iKnow technology, which is also known as InterSystems Text Analytics in InterSystems IRIS. Feel free to play with the demo of this tool or learn more about it on InterSystems Open Exchange.

6
3 1283
Article Athanassios Hatzis · Feb 16, 2017 4m read

Hi,

I would like to draw your attention on a recently published article, titled "A Quick Guide on How to Prevail in the Graph Database Arena", that has been posted also at LinkedIn. Intersystems Caché has been referenced several times. In the "Multi-model Database Engine" section of this article, there is a quick description of Caché  as an

object database with relational access, integrated support for JSON documents and a multidimensional key-value storage mechanism that can be easily extended to cover Graph data model
1
1 1276
Article Dmitry Pavlov · Jan 20, 2017 7m read

About the Ontodia library

First of all, I think we should provide some background information about Ontodia and Caché DBMS. Let’s start with a less known product, Ontodia. Ontodia is the result of a joint project of the ISST lab of the ITMO University and VISmart, a software development company specializing in the semantic web domain. The Ontodia service was created as a web application for visualizing linked data and ontologies. We created this service because we couldn’t find simple, accessible and efficient tools for convenient visualization of linked data.

3
0 1089