Article
· Oct 19, 2022 2m read

InterSystems IRIS integration for Node-RED

The concept of low code development is getting more and more important across all industries. Everybody who is starting to get into low code programming, will inevitably come across Node-RED. InterSystems IRIS is renowned for its interoperability and so should be accessible via Node-RED.

For those who have not heard of Node-RED yet: Node-RED is a Low-Code programming application, which is based on so called nodes that are connected with wires. Nodes process incoming messages and forward them to the next connected node. Due to the great community, Node-RED offers a wide variety of nodes for all kind of applications.

Given that it would surely be useful to have a node that can interact with InterSystems IRIS right? And that is exactly what I did!

Node-RED does already have an InterSystems IRIS integration, but it was not secured against the threat of SQL-Injection. Therefore, I hardened it by safeguarding it against SQL-Injection through parameterizing the statements.

To see how to install Node-RED you can follow this guide and for information about the installation of the InterSystems IRIS node, you are invited to review the respective node documentation.

Here is a quick Demo on how to use the nodes:

First of all we want to create a class called "Demo.Person". It inherits from %Persistent and %Populate, so we can call the method Populate and fill the table with data:

 

 

Now we seek to insert our custom data into InterSystems IRIS. We can do this by using an insert statement and passing it to the IRIS-Node or by building a JSON Object and passing it to the IRIS_OO-Node:

 

 

Of course we would also like to access our data in Node-RED:

 

Note that the Node can also parametrize the statement itself.

If you want to try out the flow by yourself, you can download it here.

At the end I want to show you how fast you can create applications with Node-RED. In the following video you can see how I built an application that generates random machine data (temperature and pressure) and pushes the data to InterSystems IRIS. Afterwards selects it from InterSystems IRIS and displays it in two different ways in the Graphical User Interface:

 

 

View on npm  
View on GitHub
View on nodered.org

Discussion (5)1
Log in or sign up to continue