Find

Article
· Oct 6 5m read

Presenting IRIS Tool and Data Manager: Integrating InterSystems IRIS with Python, Pandas, and Streamlit

Hi everyone! 👋
I’m excited to share the project I’ve submitted to the current InterSystems .Net, Java, Python, and JavaScript Contest — it’s called IRIStool and Data Manager, and you can find it on the InterSystems Open Exchange and on my GitHub page.

Overview

The project involves a comprehensive Python toolkit, IRIStool, that seamlessly integrates pandas DataFrames with InterSystems IRIS databases. It also includes a Streamlit-based web interface, the Data Manager, that lets you explore, visualize, and manage your IRIS data all without writing a single line of SQL.

This proof of concept showcases how InterSystems IRIS can easily connect with modern Python tools such as pandas and plotly, thanks to the IRIS Native Python SDK, enabling advanced data manipulation and visualization

The project consists of two main components:

  • 🧠 IRIStool — A Python module that provides a pandas-like interface to interact with IRIS databases
  • 📊 IRIS Data Manager — A Streamlit web app for intuitive data exploration, visualization, and management

IRIStool (Python Module)

The IRIStool class brings the flexibility of pandas to IRIS. It allows Python developers to interact with IRIS tables just as easily as with DataFrames.

Key Features

  • DataFrame ↔ IRIS Table Conversion with automatic type inference
  • CRUD operations and SQL view creation
  • Schema exploration and metadata inspection
  • Support for standard and HNSW vector indexes for semantic search
  • Context manager support for safe, automatic connection handling

With IRIStool, you can move effortlessly between Python and IRIS.

IRIS Data Manager (Streamlit UI)

The IRIS Data Manager is a visual, no-code interface built with Streamlit, designed to make data management in IRIS accessible to everyone, from developers to analysts.

What You Can Do

  • Configure and test database connections directly from the sidebar
  • Upload and import CSV, Excel, or JSON files
  • Explore tables and schemas visually
  • Filter data, group results, and apply aggregations
  • Generate interactive visualizations with plotly
  • Query your data using AI-powered Text-to-SQL, backed by Ollama running locally — meaning your data never leaves your environment

Quickstart Example with IRIStool

Here’s a complete example showing how to go from a pandas DataFrame to a live InterSystems IRIS table, perform inserts and updates, run queries, and create a view for analytics, all using IRIStool.

import pandas as pd
from datetime import datetime
from utils.iristool import IRIStool

# Connect to InterSystems IRIS
with IRIStool(
    host="localhost",
    port=1972,
    namespace="USER",
    username="_SYSTEM",
    password="SYS"
) as iris:

    # Create initial data as a pandas DataFrame
    employees = pd.DataFrame([
        {"ID": 1, "Name": "Alice", "Age": 29, "Department": "IT", "HireDate": datetime(2021, 5, 10)},
        {"ID": 2, "Name": "Bob", "Age": 34, "Department": "HR", "HireDate": datetime(2019, 11, 3)},
        {"ID": 3, "Name": "Carol", "Age": 25, "Department": "Finance", "HireDate": datetime(2023, 2, 15)}
    ])

    # Convert the DataFrame into an IRIS table
    iris.df_to_table(
        df=employees,
        table_name="Employee",
        primary_key="ID",
        exist_ok=True,
        drop_if_exists=True
    )
    print("DataFrame successfully uploaded to IRIS")

    # Insert additional records
    iris.insert_many("Employee", [
        {"ID": 4, "Name": "Dave", "Age": 31, "Department": "R&D", "HireDate": datetime(2020, 7, 18)},
        {"ID": 5, "Name": "Eve", "Age": 28, "Department": "Marketing", "HireDate": datetime(2022, 3, 5)}
    ])
    print("New rows inserted")

    # Fetch and display all employees older than 28
    df = iris.fetch("""
        SELECT ID, Name, Department, Age, HireDate
        FROM Employee
        WHERE Age > ?
    """, [28])
    print("\nEmployees older than 28:\n", df)

    # Update a record (Bob moves from HR to Operations)
    iris.update(
        table_name="Employee",
        new_values={"Department": "Operations"},
        filters={"Name": "Bob"}
    )
    print("Updated Bob’s department to Operations")

    # Create a view showing the average age per department
    iris.create_view(
        view_name="AvgAgeByDept",
        sql="""
            SELECT Department, AVG(Age) AS AvgAge
            FROM Employee
            GROUP BY Department
        """
    )

    avg_age = iris.fetch("SELECT * FROM AvgAgeByDept")
    print("\n Average age by department:\n", avg_age)

Examples workflows of IRIS Data Manager UI

The IRIS Data Manager is built on top of IRIStool and provides a no-code interface for all stages of data handling, from ingestion to visualization and analysis. It’s the fastest way to explore and interact with your InterSystems IRIS data directly from the browser.

To start the app, run the following command from your project root:

streamlit run app.py

1. Import data

  • Open the Upload Data tab
  • Drag and drop a file (supported formats include .json, .csv, .xlsx, and .xls) to upload data
  • Configure indices (standard or vector indexes are supported)
  • Select table schema and name — by default, data will be stored in the SQLUser schema
  • Optionally define a primary key
  • Click “Import to IRIS” to upload and persist your dataset

The IRIS Data Manager automatically detects data types, creates the corresponding table in IRIS, and loads the data seamlessly.

In this example I'm importing the sleep disorders database, available on Kaggle:

2. Visualize data

  • Navigate to Explore & Analyze tab
  • Choose your table and schema
  • View analytics of your data both for numerical and categorical columns

  • Explore data interactively using Plotly charts

  • Group and aggregate data directly from the interface — no SQL required

  • In the Text to SQL tab, you can query your data just by asking questions in plain English.
    • Type questions like:
    • “Show the average sleep duration grouped by occupation and gender”
    • “What is the occupation with the best sleep quality?"
  • The model (running locally via Ollama) translates it into SQL
  • The query executes live on your IRIS instance, and the results are displayed


🔗 Try It Out

👉 GitHub Repository: IRIS Tool and Data Manager
👉 Vote for it in the InterSystems Developer Community Contest!

1 Comment
Discussion (1)1
Log in or sign up to continue
Question
· Oct 6

Cómo saber en qué línea está fallando algo

Antes cada vez que salía un error del estilo:

Unknown status code: 9 (<UNDEFINED>,ztoken+57^test.OAuth.1,)

Podíamos abrir el Studio, la clase en cuestión que había dado error, hacer click en el icono  y en el buscador poner ztoken+57:

Y esto nos llevaba exactamente a la línea que estaba dando el error:

Ahora que trabajamos desde VSCode, hay alguna forma de hacer esto? Sino, qué alternativa tendríamos?

1 new Comment
Discussion (1)1
Log in or sign up to continue
Article
· Oct 6 3m read

GORM e InterSystems IRIS: Presentando gorm-iris

Si pensabais que el soporte nativo de Go para IRIS era emocionante, esperad a ver lo que pasa cuando GORM entra en juego


Hace poco dimos la bienvenida al soporte nativo de GoLang para InterSystems IRIS con el lanzamiento de go-irisnative. Eso fue solo el comienzo. Ahora vamos un paso más allá con el lanzamiento de gorm-iris, un controlador GORM diseñado para llevar el poder del Object Relational Mapping (ORM) a vuestra combinación de IRIS + Go.

¿Por qué GORM?

GORM es una de las bibliotecas ORM más populares en el ecosistema de Go. Facilita la interacción con las bases de datos usando structs de Go en lugar de escribir SQL puro. Con funciones como migraciones automáticas, asociaciones y creación de consultas, GORM simplifica mucho el desarrollo de backend.

Así que, naturalmente, el siguiente paso después de permitir que Go se comunique de forma nativa con IRIS era hacer que GORM funcionara sin problemas con él. Y eso es exactamente lo que hace gorm-iris.


¿Qué es gorm-iris?

gorm-iris es un controlador GORM personalizado para InterSystems IRIS, construido sobre go-irisnative. Actúa como un puente que permite a los desarrolladores usar la sintaxis y los patrones familiares de GORM para interactuar con una base de datos IRIS, mientras que todo el trabajo pesado por detrás se gestiona mediante llamadas nativas a IRIS. 

Pensad en ello como lo mejor de ambos mundos:

  • Rendimiento y acceso a datos nativos a través de go-irisnative
  • Funcionalidades de ORM fáciles de usar gracias a GORM

Características clave

Esto es lo que podéis esperar de gorm-iris:

✅ Integración fluida entre GORM e IRIS
✅ Uso de structs nativos de Go para modelar vuestros datos en IRIS
✅ Operaciones básicas de CRUD listas para usar
✅ Comportamiento personalizable a través de interfaces de Go

Y por supuesto, todo es de código abierto.


Ejemplo rápido para empezar

¿Queréis empezar? Aquí tenéis una configuración mínima para mostrar cómo funciona:

package main

import (
	"fmt"
	iris "github.com/caretdev/gorm-iris"
	"gorm.io/gorm"
)

type User struct {
  ID    int
  Name  string
  Email string
}

func main() {
  dsn := "iris://_SYSTEM:SYS@localhost:1972/USER"
  db, err := gorm.Open(iris.Open(dsn), &gorm.Config{})
  if err != nil {
    panic("failed to connect to IRIS")
  }

	// Auto-migrate schema
  db.AutoMigrate(&User{})

  // Create
  db.Create(&[]User{
		{Name: "Johh", Email: "john@example.com"},
		{Name: "Johh1", Email: "john1@example.com"},
		{Name: "John2", Email: "john2@example.com"},
	})

  // Read
  var user User
  db.First(&user, "email = ?", "john1@example.com")
	fmt.Printf("Found: ID: %d; Name: %s\n", user.ID, user.Name)
}

Sí, eso es realmente todo.


¿Qué hay bajo el capó?

El controlador gorm-iris traduce las operaciones de GORM en llamadas nativas a través de go-irisnative. Esto significa que seguís teniendo la velocidad y eficiencia del acceso directo a IRIS, pero con una abstracción de más alto nivel para los casos de uso diarios.

Es ideal para desarrolladores que:

  • Quieren construir aplicaciones en Go con IRIS como backend
  • Prefieren el desarrollo al estilo ORM en lugar de la construcción directa de consultas
  • Buscan crear prototipos o aplicaciones a gran escala con código Go limpio y legible

Hacia dónde se dirige

Esto es solo la versión 0.1.1 — estamos trabajando activamente en mejorar la cobertura de funcionalidades, la optimización del rendimiento y el manejo de características más complejas de GORM.

Si lo usáis y tenéis comentarios o solicitudes de funciones — ¡los issues y PRs son bienvenidos!

👉 Echad un vistazo al repositorio: https://github.com/caretdev/gorm-iris 


Reflexiones finales

Con go-irisnative abrimos la puerta para que los desarrolladores de GoLang hablen con InterSystems IRIS. Con gorm-iris, les invitamos a quedarse a cenar.

Esta librería trata de hacer que IRIS se sienta como en casa en vuestro flujo de trabajo de desarrollo en Go. Es limpia, expresiva y aprovecha las herramientas que los desarrolladores de Go ya adoran.

Así que adelante — probadla, construid algo interesante y contadnos qué pensáis.

Discussion (0)1
Log in or sign up to continue
Discussion (0)2
Log in or sign up to continue
Announcement
· Oct 6

Vuelve a ver el webinar "De los datos al conocimiento: Sacando provecho a la Información Clínica con InterSystems e IA"

Hola! 

¿Qué tal se presenta la semana? 🚀 El jueves tuvimos un webinar fantástico con @Rodrigo Barahona. A parte de unas reflexiones sobre el sector sanitario y la posibilidades de la IA, nos mostró su aplicación práctica a través de un agente creado con inteligencia artificial. También, @David Reche nos adelantó que en unos pocos meses volveremos a vernos en Madrid ¡lo estamos deseando! 😶 No queremos revelar demasiado aún... pero estad atentos  

 

Hubo varias dudas, comentarios y en general ¡os gustó mucho! Normal, Rodrigo es un maestro de esto. Agradecemos su participación, humor y dinamismo en la explicación. 

➡ ¿Qué? ¿Os lo perdisteis? Tranquilos... Podéis volver a verlo en la plataforma donde se emitió, a máxima calidad, o en nuestro canal de YouTube.

¡Buena semana a todos! 🙌

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