Hey Community!
We're happy to share a new video from our InterSystems Developers YouTube:
⏯ Foreign Tables In 2025.2 @ Ready 2025

SQL is a standard language for storing, manipulating and retrieving data in relational databases.
Hey Community!
We're happy to share a new video from our InterSystems Developers YouTube:
⏯ Foreign Tables In 2025.2 @ Ready 2025

Hello!
I'm trying to create some foreign tables to a PostgreSQL database. In some cases, columns with certain datatypes cannot be consumed by IRIS and the following error is thrown:
[SQLCODE: <-237>:<Schema import for foreign table did not return column metadata>]
[%msg: <Unkown data type returned by external database>]
For example: serial4 typed ID columns are typical examples. Is it possible, what's the best way of resolving these datatypes, which- seemingly- don't have proper JDBC metadata mappings?
.png)
Hi Community,
In this article, we will explore the concepts of Dynamic SQL and Embedded SQL within the context of InterSystems IRIS, provide practical examples, and examine their differences to help you understand how to leverage them in your applications.
InterSystems SQL provides a full set of standard relational features, including the ability to define table schema, execute queries, and define and execute stored procedures. You can execute InterSystems SQL interactively from the Management Portal or programmatically using a SQL shell interface. Embedded SQL enables you to embed SQL statements in your ObjectScript code, while Dynamic SQL enables you to execute dynamic SQL statements from ObjectScript at runtime. While static SQL queries offer predictable performance, dynamic and embedded SQL offer flexibility and integration, respectively.
Hey Community!
We're happy to share a new video from our InterSystems Developers YouTube:
⏯ Document Server: Improving Performance While Reducing Stored Data @ Ready 2025
Window functions in InterSystems IRIS let you perform powerful analytics — like running totals, rankings, and moving averages — directly in SQL.
They operate over a "window" of rows related to the current row, without collapsing results like GROUP BY.
This means you can write cleaner, faster, and more maintainable queries — no loops, no joins, no temp tables.
In this article let's understand the mechanics of window functions by addressing some common data analisys tasks.
So, you checked your server and saw that IRISTEMP is growing too much. There's no need to panic. Let’s investigate the issue before your storage runs out.
Before assuming IRISTEMP is the problem, let’s check its actual size.
Run the following command in the IRIS terminal:
%SYS>do ^%FREECNTWhen prompted, enter:
Database directory to show free space for (*=All)? /<your_iris_directory>/mgr/iristemp/Have you ever tried to do a search in Message Viewer on a busy interface and had the query time out? This can become quite a problem as the amount of data increases. For context, the instance of Health Connect I am working with does roughly 155 million Message Headers per day with 21 day message retention. To try and help with search performance, we extended the built-in SearchTable with commonly used fields in hopes that indexing these fields would result in faster query times. Despite this, we still couldn't get some of these queries to finish at all.
Hello all,
I'm trying to build a cube based on a linked table but seems that IRIS is not able to do it :O
Long story short, I have a linked table in IRIS that sources a Microsoft SQL table (using standard linked feature from the portal). It works fine, I can access it using SQL as many other times. On top of that, I've created in DeepSee (ok, Analytics) a cube that uses this class as source. It compiles correctly, no errors given. When I build it with 100 records, all goes well and using Analyzer I can see results.
I was facing the same issue as Jerry faced when connecting IRIS to SQL server. My ODBC connection is configured to authenticate via windows authentication.
Configure IRIS ODBC connection with Windows authentication using a
How I fixed it for myself?
Hi community.
I have a query:
SELECT
nameField,
dateField,
anotherDateField
FROM
(
SELECTMIN(someDate) as dateField,
nameField,
anotherDateField
FROM $$$SOURCEWHERE $$$RESTRICT
GROUPby someOtherField
)
WHERE dateField >= anotherDateFieldThis query should filter the data by the minimum value of the somDate field, but it doesn't. It displays all values together, regardless of the external filter. The exact same query (without the $$$ tokens, of course) works fine in a regular SQL runtime.
My guess is that the $$$RESTRICT does this
The 2025.1.2 and 2024.1.5 maintenance releases of InterSystems IRIS® data platform, InterSystems IRIS® for HealthTM, and HealthShare® Health Connect are now Generally Available (GA). These releases include the fixes for a number of recently issued alerts and advisories, including the following:
Hello community,
I wanted to share my experience about working on Large Data projects. Over the years, I have had the opportunity to handle massive patient data, payor data and transactional logs while working in an hospital industry. I have had the chance to build huge reports which had to be written using advanced logics fetching data across multiple tables whose indexing was not helping me write efficient code.
Here is what I have learned about managing large data efficiently.
Choosing the right data access method.
As we all here in the community are aware of, IRIS provides multiple ways to access data. Choosing the right method, depends on the requirement.
Set ToDate=+HSet FromDate=+$H-1ForSet FromDate=$O(^PatientD("Date",FromDate)) Quit:FromDate>ToDate Do
. Set PatId=""ForSet PatId=$Order(^PatientD("Date",FromDate,PatID)) Quit:PatId=""Do
. . Write$Get(^PatientD("Date",FromDate,PatID)),!In the modern world, the most valuable asset for companies is their data. Everything from business processes and applications to transactions is based on data which defines the success of the organization's operations, analysis, and decisions. In this scenario, the data structures need to be ready for frequent changes, yet in a managed and governed way. Otherwise, we will inevitably lose money, time, and quality of corporate solutions.For a long time, data management and governance were solely based on the data itself, with excellent backup, restoration, ACID (Atomicity, Consistency,
Hi Team,
Can I please check if anyone has built a simple web interface for maintaining custom SQL lookup class.
We have a simple persistent class in HealthShare which is used for storing Pathology test codes. Test codes in this lookup class is used for message filtering and applying additional logic when processing pathology results/orders.
We want to make this class available to external users from pathology (not the usual management portal users) to maintain so that they can add/edit/delete test codes as required.
Hey Community!
We're happy to share a new video from our InterSystems Developers YouTube:
⏯ Advanced SQL join table cardinality estimates @ Ready 2025
Is there a way to create a table for the results of a SQL statement ?
Example: Consider the below query and results.
Select ID,Name,DOB,Gender from EMS.EMS
RESULT
| ID | NAME | DOB | Gender |
|---|---|---|---|
| 1 | Wijnschenk,Greta N. | 03/09/2009 | F |
| 2 | Klausner,Barbara L. | 03/08/2014 | M |
| 3 | Eastman,Liza X. | 03/11/2000 | F |
| 4 | O'Brien,Barb K. | 03/07/2016 | M |
| 5 | Anderson,Nataliya Y. | 03/14/1991 | F |
| 6 | Long,Debby Z. | 03/12/1999 | F |
| 7 | Rogers,Susan W. | 03/12/1997 | F |
| 8 | Ott,Lola J. | 03/09/2009 | F |
| 9 | Yu,Alice S. | 03/14/1990 | M |
| 10 | Wilson,Debby I. | 03/12/1998 | M |
In my previous article, Using LIKE with Variables and Patterns in SQL, we explored how the LIKE predicate behaves in different scenarios, from Embedded SQL to Dynamic SQL, and what happens to performance when wildcards and variables come into play. That piece was about getting comfortable writing a working LIKE query. But writing SQL that works is only the starting point. To build applications that are reliable, scalable, and secure, you need to understand the best practices that underpin all SQL, including queries that use LIKE.
This article takes the next step. We’ll look at a few key points to help strengthen your SQL code, avoid common pitfalls, and make sure your SELECT statements run not just correctly, but also efficiently and safely. I'll use SELECT statements with LIKE predicate as an example along the way, showing how these broader principles directly affect your queries and their results.

*This is what Gemini came up with for this article, kinda cute.
In a previous article, I presented the IRIStool module, which seamlessly integrates the pandas Python library with the IRIS database. Now, I'm explaining how we can use IRIStool to leverage InterSystems IRIS as a foundation for intelligent, semantic search over healthcare data in FHIR format.
This article covers what I did to create the database for another of my projects, the FHIR Data Explorer. Both projects are candidates in the current InterSystems contest, so please vote for them if you find them useful.
You can find them at the Open Exchange:
In this article we'll cover:
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.
When we need to integrate Caché/IRIS with other relational databases, one common question arises: “How do I set up the JDBC connection?”.
The official documentation doesn’t always provide a straightforward step-by-step guide, which can be frustrating, especially for beginners.
In this article, I’ll walk you through the entire process of configuring a JDBC connection with MySQL, from downloading the connector to linking tables in Caché/IRIS.
Hi Community,
I’m trying to execute a directory query in InterSystems IRIS using %SQL.Statement, but encountering an unexpected error.
Details:
The following command confirms that the directory exists:
Set dirPath="\\MYNETWORK_DRIVE\DFS-Shared_Product\GXM"
Write ##class(%File).DirectoryExists(dirPath)
It returns 1, meaning the path is valid and accessible.
However, when I try to execute this SQL query:
Set File=##Class(%SQL.Statement).%New()
Set Status=File.%PrepareClassQuery("%File","FileSet")
Set Result=File.%Execute(dirPath)
If Result.%SQLCODE {
Write Result.%Message
}
I get the error:
I joined InterSystems less than a year ago. Diving into ObjectScript and IRIS was exciting, but also full of small surprises that tripped me up at the beginning. In this article I collect the most common mistakes I, and many new colleagues, make, explain why they happen, and show concrete examples and practical fixes. My goal is to help other new developers save time and avoid the same bumps in the road.
In this tutorial, I will discuss how can you connect your IRIS data platform to sql server db .
Prereq:
InterSystems FAQ rubric
One way to optimize query performance is to use query parallelism on a per-query or system-wide basis (a standard feature).
This is a technique for dividing the execution of a particular query among processors on a multi-processor system. The query optimizer will execute parallel processing only if there is a possibility of benefiting from parallel processing. Parallel processing is only applicable to SELECT statements.
We're excited to announce a new version release of the SQLTools VS Code extension.
SQLTools connects VS Code users to the most commonly used databases using drivers, including InterSystems IRIS. With over 3.5 million downloads, it is helping users work with their data much more easily.
In the previous article, we saw how to build a customer service AI agent with smolagents and InterSystems IRIS, combining SQL, RAG with vector search, and interoperability.
In that case, we used cloud models (OpenAI) for the LLM and embeddings.
This time, we’ll take it one step further: running the same agent, but with local models thanks to Ollama.
I have been walking through this with a few team members and as such I thought there might be others out there who could use it, especially if you work with HL7 & Ensemble/HealthConnect/HealthShare and never venture out past the Interoperability section.
First, I would like to establish that this is an extension of the already established documentation on importing and exporting SQL data found here: https://docs.intersystems.com/iris20241/csp/docbook/DocBook.UI.Page.cls?KEY=GSQL_impexp#GSQL_impexp_import
We currently have Business Operation that we built to use the EnsLib.SQL.OutboundAdapter so we can make Microsoft SQL Server Stored Procedure calls. The BO is attached to a Java Gateway Service.
Some of our MS SQL Databases have moved from being OnPrem to Azure Cloud. We have started seeing where we are receiving errors on the BO saying that we cannot connect to the Azure Database, but we never receive a Disconnect from the Azure Database.
I am trying to help another group within our organization access a SQL Table that I have created to populate Epic Department Data within our environment and came across the ability to use SQL Seach REST Interface using iKnow.
However, I am having issues trying to get it to work via POSTMAN before I hand off the solution...
the POST URL... https://<servername>/api/iKnow/latest/TESTCLIN/table/osuwmc_Epic_Clarity.DepartmentMaster/search
where osuwmc_Epic_Clarity.DepartmentMaster is the table
In the body...
Hello,
I am currently maintaining a legacy application that was developed in ObjectScript and accesses data by working directly with globals.
For a new program, however, I plan to access the same global data through SQL-mapped classes.
I have two questions regarding this approach: