Using IRIS 2024.1.2 when I mount the routine database as read-only I get an error when executing dynamic SQL queries.
What globals need to be mapped in a read-write database in order to allow execution plans to be written?
SQL is a standard language for storing, manipulating and retrieving data in relational databases.
Using IRIS 2024.1.2 when I mount the routine database as read-only I get an error when executing dynamic SQL queries.
What globals need to be mapped in a read-write database in order to allow execution plans to be written?
If your need is interactions between the client and the application (and consequently the database), Dynamic SQL may be more appropriate, as it "adapts" very easily to these query changes. However, this dynamism has a cost: with each new query, it is remodeled, which can have a higher cost to execute. Below is a simple example of a Python code snippet.
Using SQL Gateway with Python, Vector Search, and Interoperability in InterSystems Iris
Part 3 – REST and Interoperability
Now that we have finished the configuration of the SQL Gateway and we have been able to access the data from the external database via python, and we have set up our vectorized base, we can perform some queries. For this in this part of the article we will use an application developed with CSP, HTML and Javascript that will access an integration in Iris, which then performs the search for data similarity, sends it to LLM and finally returns the generated SQL. The CSP page calls an API in Iris that receives the data to be used in the query, calling the integration. For more information about REST in the Iris see the documentation available at https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
Introduction
To achieve optimized AI performance, robust explainability, adaptability, and efficiency in healthcare solutions, InterSystems IRIS serves as the core foundation for a project within the x-rAI multi-agentic framework. This article provides an in-depth look at how InterSystems IRIS empowers the development of a real-time health data analytics platform, enabling advanced analytics and actionable insights. The solution leverages the strengths of InterSystems IRIS, including dynamic SQL, native vector search capabilities, distributed caching (ECP), and FHIR interoperability. This innovative approach directly aligns with the contest themes of "Using Dynamic SQL & Embedded SQL," "GenAI, Vector Search," and "FHIR, EHR," showcasing a practical application of InterSystems IRIS in a critical healthcare context.
In the world of APIs, REST is very extended. But what happens when you need more flexibility in your data-fetching strategies? For instance letting the client to choose what fields is going to receive. Enter GraphQL, a query language for your APIs that provides a flexible alternative to REST.
In this post, we will:
Hi Everyone!
The Certification Team of InterSystems Learning Services is currently developing an InterSystems ObjectScript Specialist certification exam. Earlier this month we reached out to our community for feedback that will help us evaluate and establish the contents of this exam. We are still currently accepting responses and would love to hear your feedback!
Please note that this is one of two exams being developed to replace our InterSystems IRIS Core Solutions Developer exam. You can find more details about the other exam, InterSystems IRIS Developer Professional exam, here
Hi Community,
I've created a method in my File Service to do a cleanup for every file load. Currently, I've set it to delete data when LastUpdated date is greater than maxdate. However, I want to do a cleanup for every new file load. Any suggestions or advice on how to do this? Thanks!
{
Set tMaxDate = ""
&SQL(SELECT Max(LastUpdated) into :tMaxDate
FROM MC_Table_Data.Patient)
&SQL(DELETE MC_Table_Data.Patient WHERE LastUpdated<:tMaxDate)
}
Hello,
So i want to use the INSERT OR UPDATE command so i can update a COUNTER for a given name:
INSERT OR UPDATE myTable
SET name='Omer', counter = counter + 1;
as you can see with the above code - if the row is non-existent then we get an error because COUNTER is NULL!
Hi Community,
This is a detailed, candid walkthrough of the IRIS AI Studio platform. I speak out loud on my thoughts while trying different examples, some of which fail to deliver expected results - which I believe is a need for such a platform to explore different models, configurations and limitations. This will be helpful if you're interested in how to build 'Chat with PDF' or data recommendation systems using IRIS DB and LLM models.
February 19, 2025 – Alert: SQL Queries Returning Wrong Results
InterSystems has corrected two issues that can cause a small number of SQL queries to return incorrect results. In addition, InterSystems has corrected an inconsistency in date/time datatype handling that may lead to different, unexpected – yet correct – results for existing applications that rely on the earlier, inconsistent behavior.
Hello!
So my question is quite simple, Do the different data models of Intersystems all support the ACID properties?
I assume that for the SQL data model implementation it does, But does it also work for global (i.e the hierarchical data model)?
I searched the docs and the different articles, It seems for example that here its implied that the different data models of Intersystems DO indeed support the ACID properties and allow for safe insertion, deletion etc... in concurrent operations to the server that is.
Would love to get a clarification, Thx!
Hi Folks!
Have a very simple question, I hope :)
How can I make sure that user 'John' is already created in the IRIS system?
Preferabbly via SQL?
thanks a lot!
Using SQL Gateway with Python, Vector Search, and Interoperability in InterSystems Iris
Part 2 – Python and Vector Search
Since we have access to the data from our external table, we can use everything that Iris has to offer with this data. Let's, for example, read the data from our external table and generate a polynomial regression with it.
For more information on using python with Iris, see the documentation available at https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=AFL_epython
Let's now consume the data from the external database to calculate a polynomial regression. To do this, we will use a python code to run a SQL that will read our MySQL table and turn it into a pandas dataframe:
Using SQL Gateway with Python, Vector Search, and Interoperability in InterSystems Iris
Part 1 - SQL Gateway
Hello
In this article we will look at the use of SQL Gateway in Iris. SQL Gateway allows Iris to have access to tables from other (external) database via ODBC or JDBC. We can access Tables or Views from various databases, such as Oracle, PostgreSQL, SQL Server, MySQL and others.
Hello,
It's possible to set a value to a "variable" in SQL Cache?
Like in SQl Server or Oracle?
Thanks
In MySQL I have the following table:
CREATE TABLE `info` ( `created` int(11) );
And it is linked (via JDBC SQL Gateway) to Cache table mysql.info. `created` field stores unix timestamp. So when I execute this SQL in SMP:
SELECT created FROM mysql.info
I receive the following output (which is expected):
| created |
| 1435863691 |
| 1436300964 |
But I want to to display `created` field converted to ODBC timestamp format. To do that I call this SQL procedure
Class mysql.In this article, exceptions are covered.
Working with Exceptions
Instead of returning a %Status response, you can raise and throw an Exception. You are then responsible for catching the exception and validating it. IRIS provides five main classes to handle exceptions effectively. Additionally, you can create custom exception class definition based on your needs.
These exceptions are different from %Status, so you can't directly/efficiently use the exception object with $SYSTEM.OBJ.DisplayError() or $SYSTEM.Status.DisplayError()
From the previous article, we identified some issues when working with JSON in SQL.
IRIS offers a dedicated feature for handling JSON documents, called DocDB.
InterSystems IRIS® data platform DocDB is a facility for storing and retrieving database data. It is compatible with, but separate from, traditional SQL table and field (class and property) data storage and retrieval. It is based on JSON (JavaScript Object Notation) which provides support for web-based data exchange. InterSystems IRIS provides support for developing DocDB databases and applications in REST and in ObjectScript, as well as providing SQL support for creating or querying DocDB data.
By its nature, InterSystems IRIS Document Database is a schema-less data structure. That means that each document has its own structure, which may differ from other documents in the same database. This has several benefits when compared with SQL, which requires a pre-defined data structure.
The word “document” is used here as a specific industry-wide technical term, as a dynamic data storage structure. “Document”, as used in DocDB, should not be confused with a text document, or with documentation.
Let's explore how DocDB can help store JSON in the database and integrate it into projects that rely solely on xDBC protocols.
Host Variables are a rather common programming feature in many implementations of SQL.
A recent question in DC made me aware that in IRIS, Caché, Ensemble, ...
host variables just exist within embedded SQL
> You can supply host variables for Embedded SQL queries only. <
Related examples are included in the available Documentation
This is a description for a workaround if you don't / can't use embedded SQL.
You need to install the application first. If not installed, please refer to the previous article
After successfully running the iris image vector search application, some data needs to be stored to support image retrieval as it is not initialized in the library.
Firstly, drag and drop the image or click the upload icon, select the image, and click the upload button to upload and vectorize it. This process may be a bit slow.
.png)
This process involves using embedded Python to call the CLIP model and vectorize the image into 512 dimensional vector data.
While working on getting JSON support for some Python libraries, I discovered some capabilities IRIS provided.
I am currently experiencing frustration with trying to Authenticate an Active Directory account through JDBC as the Hospital System moves from OnPrem SQL Server to using Azure SQL Server with Microsoft Entra Authentication.
Microsoft cannot give me a straight answer of what is required from a JDBC standpoint to authenticate from a Linux environment.
I am working with WRC, but we are both struggling to find the specific answer for JDBC. If I use my local desktop and JDBC to connect through DBeaver I don't have an issue.
Not sure there are many that connect to MS SQL to execute queries, stored procedures, etc, but our Healthsystem has many different MS SQL based databases we use within the Interoperability environment for various reasons.
With the push to moving from on-prem to the Cloud we ran into some difficulties with our SQL Gateway connections and knowing how to config them to use Microsoft Entra for Active Directory Authentication.
There are many articles out on the web, but there was not one that could give us the full answer to what we needed to do, and Microsoft wasn’t much help.
Hello guys,
I need to tranform columns into rows or rows into columns.
I'm using only SQL Cache.
The code:
SELECT
codRepresentante
,vendasAbril
,vendasAgosto
FROM
Ped.MetasRepresen
WHERE ano = 2024The columns:
.png)
Can you help me?
Thanks
Hi Everyone!
The Certification Team of InterSystems Learning Services is currently developing an InterSystems ObjectScript Specialist certification exam, and we are reaching out to our community for feedback that will help us evaluate and establish the contents of this exam.
Please note that this is one of two exams being developed to replace our InterSystems IRIS Core Solutions Developer exam. You can find more details about the other exam, InterSystems IRIS Developer Professional exam, here.
How do I provide my input? Complete our Job Task Analysis (JTA) survey
Hello everyone,
I’m facing issues with replicating data from my Caché 2016 database to a PostgreSQL database. I need to handle around 300 data updates per minute, and whenever certain tables are modified, those changes must be reflected in other databases.
So far, I’ve tried various approaches, including:
However, each of these solutions has led to performance bottlenecks and system lockups.
I need to use a context variable in my code block for the table to query. When I use :content.table, it does not work. When using the literal, it does. How do I get the :context to work?
.png)
Hi! I've extended my demo repository, andreas5588/demo-dbs-iris, to make it easy to test the FOREIGN SERVER and FOREIGN TABLE features in IRIS.
To achieve this, I created a namespace called FEDERATION. The idea is as follows:
The Script: demo-dbs-iris/src/sql/02_create_foreign_server.sql.png)
IRIS does not support executing SQL statements that combine tables from different namespaces.
In tracking down some of our Orphaned message issues, I was wondering if setting our EnsLib.SQL.Snapshot variable equal to "" was the same as calling the .Clean() method on EnsLib.SQL.Snapshot? Are they the same?
should I be possibly using ##class(EnsLib.SQL.Snapshot).%Delete() instead?
Hy Friends,
I have a little problem, I need to diplay the data based on input status (first time and after)
this is the data:
.png)
and this what I need to display
.png)
the notes become new because it is the first time that the data has been inputed, and it will become old if we have the data before (2nd data, 3rd data the notes will become old).
I've try to use SubQuery (with LAG Script also) but it doesn't works, because it will give a notes Old even it's a New Data
Does anyone could help me ?
Thank You
Best Regards,
Steven Henry