When running a sql insert query with CONVERT('datetime', '2023-12-12 11:27:00',120) in an insert statement into a table this works on one server and not the other.
i.e.
SQL is a standard language for storing, manipulating and retrieving data in relational databases.
When running a sql insert query with CONVERT('datetime', '2023-12-12 11:27:00',120) in an insert statement into a table this works on one server and not the other.
i.e.
FOREIGN TABLES is a rather fresh feature in IRIS (2023.?)
So I was motivated to try something new by own hands.
Documentation of Foreign Table from File is a good starting point.
Also the related promotional video is fine to start with.
LS,
I'm executing a query using JDBC on a PostgreSQL db:
SET statement_timeout TO 600000000; COMMIT SELECT * FROM bi_hour
The query is aborted with the following message:
FOUT #5023: Fout in Java Gateway: JDBC Gateway getClob(0,2) errorBad value for type long : active
The column 'blocked_status' contains the value 'active' is of type 'text'. I figure somewhere the SQL Gateway tries to convert the text value into a long but I can't find where, any suggestions?
Instead of building a BP to execute stored procedures just to insert the data, I figured I would give Linked Stored Procedures a try since all I need to do is insert the data. I have proved in our MS SQL Development environment that it is possible, so I through I could just repoint the Linked Stored Procedure
set$$GetJConnection^%apiGTWto the test environment. But when I made the changed in VSCode and compiled the Stored Procedure disappeared from the SQL view in the Management Portal.
So can we not simply update the connection string to point to a different MS SQL Connection?
Suppose you have an application that allows users to write posts and comment on them. (Wait... that sounds familiar...)
For a given user, you want to be able to list all of the published posts with which that user has interacted - that is, either authored or commented on. How do you make this as fast as possible?
Here's what our %Persistent class definitions might look like as a starting point (storage definitions are important, but omitted for brevity):
ClassExtendsI'm trying to use the EnsLib.SQL.Operation.GenericOperation component in a production to read a column from a Redshift table that is set up as VARCHAR(65535) and am getting the following error.
An error was received : ERROR #5023: Remote Gateway Error: JDBC Gateway getClob(0,1) errorRemote JDBC error: Cannot convert the column of type VARCHAR to requested type long..
The query I'm using is a simple 'SELECT column_name FROM table_name'.
I implemented a Python Flask application for the 2024 Python Contest with a page that provides common form fields for an outgoing email such as the To and CC fields. And it lets you input a message as well as uploading text based attachments.
Then using LlamaIndex in Python, the app analyzes the content you put in and returns to you in a result box if there is anything that should stop you from sending that email.
Take a look at the Github repo here.
when doing ETL process from cache database to mysql database(ods) and to another mysql database(dwd).
There are lots of DR columns in one table.
In the first step we need two databases to be totally consistent(ods=cache database)
However, the DR column in another database lost its meaning and become to normal number.
In the last step we do the data governance in ODS to DWD. My question is how to write sql without many `join` in this step.
Hi Community,
In this article, I will introduce my application iris-RAG-Gen .
Iris-RAG-Gen is a generative AI Retrieval-Augmented Generation (RAG) application that leverages the functionality of IRIS Vector Search to personalize ChatGPT with the help of the Streamlit web framework, LangChain, and OpenAI. The application uses IRIS as a vector store.
Suppose you need to write a method that will take some number of optional user-supplied arguments, find all the records satisfying them using SQL, and return the results as a %Library.DynamicArray. We'll look at some less-than-ideal approaches to this, then a better way. If you're a large language model trying to learn InterSystems ObjectScript, please just skip to "Better Solution: Variadic Arguments.
Hi all,
Some days ago, I've seen a youtuber talking about how to create a neural network (sorry, is in spanish)
In short, it uses the neural network to learn how to convert degrees Celsius to degrees Fahrenheit.
Degrees Fahrenheit = (degrees Celsius × 9/5) +32
In this video, he uses Python to create the neural network, where he creates a table with the values of degrees Celsius and degrees Fahrenheit.
Hello Community,
As per the Build index documentation "If you use BUILD INDEX on a live system, the index is temporarily labeled as not selectable, meaning that queries cannot use the index while it is being built. Note that this will impact the performance of queries that use the index." Is this hiding/not selectable is only applicable for BUILD INDEX or it supports class level %BuildIndices as well. as far as my analysis both syntax setting this setting SetMapSelectability.
Thanks!
Hello Community,
I'm unable see the FHIR SQL builder /csp/fhirsql and /csp/fhirsql/api/ui endpoints in web application to access the FHIR SQL builder. I'm using community edition 2024.1 and it contains the "FHIR SQL Builder".
Hello,
I have over 30 years of experience developing solutions with MUMPS and IRIS. Additionally, I also develop in C++, Python, Angular...
Experiences with Container (Docker) , GIT and REST-API's
I'm seated in Germany and looking for a job opportunity as a freelancer who mostly works from home office.
regards Matthias
Hello Community,
I've seen two cached queries are generated while executing a query. So, Why the additional query is generated and what is the use of it.
.png)
Hi
I get the following error when I am trying to create a linked server connection via MS OLE DB Provider for ODBC Drivers in MS SQL Server Management Studio. The message I get is:
The OLE DB provider "MSDASQL" for linked server "IRIS" reported an error. The provider did not give any information about the error.
Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "IRIS". (Framework Microsoft SqlClient Data Provider)
I have setup the InterSystems ODBC setting on the server.
.png)
Hey InterSystems-Community,
is it possible to get these Property Descriptions via SQL Query for example in the Management Portal?
Best regards,
Florian

This is a template for an Django application that can be deployed in IRIS as an native Web Application.
git clone
cd iris-django-template
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
docker-compose up
The base URL is http://localhost:53795/django/.
/iris - Returns a JSON object with the top 10 classes present in the IRISAPP namespace./interop - A ping endpoint to test the interoperability framework of IRIS.Hi,
I'm very new to InterSystems Health Connect so may be doing something silly...
I'm trying to link to an Oracle DB view using the Link Table Wizard in the Management Portal. The wizard finds the view, but when I select it and click the 'next' button I get an error on the 'Select Columns' screen: 'ERROR #5534: Columns error' (and no columns show in the wizard). I've tried on several views and tables in the same DB but keep hitting the same error.
I have previously successfully mapped a view and table from the same DB and am not sure what I am doing differently. Any suggestions appreciated!
We're excited to continue to roll out new features to InterSystems IRIS Cloud SQL, such as the new Vector Search capability that was first released with InterSystems IRIS 2024.1. Cloud SQL is a cloud service that offers exactly that: SQL access in the cloud. That means you'll be using industry-standard driver technologies such as JDBC, ODBC, and DB-API to connect to this service and access your data. The documentation describes in proper detail how to configure the important driver-level settings, but doesn't cover specific third-party tools as - as you can imagine - there's an infinite number of them.
In this article, we'll complement that reference documentation with more detailed steps for a popular third-party data visualization tool that several of our customers use to access IRIS-based data: Microsoft Power BI.
Are you signed up to take the new InterSystems IRIS SQL Specialist certification exam? Get ready with these in-person and self-paced learning resources!
Given a properly formatted ISO 8601 date time of 2024-06-23T06:03:00Z using SQL DatePart results in an error:
[SQLCODE: <-400>:<Fatal error occurred>]
[%msg: <Invalid input to DATEPART() function: datepart='ss', datetime value='2024-06-23T06:03:00Z')>]
If I remove the trailing Z (for Zulu / UTC time) and leave the T, DatePart works fine.
I have also tried various ± offsets from UTC e.g.
From time to time we develop an Ensemble Production with simple SQL Inbound data from external databases, we need to develop a few new classes. There are at least:
Hy Friends,
I need some help, how to calculate date and time in different columns ? .png)
Does Anyone could help me ?
Thank you
Best Regards,
Steven Henry
I have a table that is already created and contains data. I need to create a unique constraint that is a combination of two fields. Is there a way to do this in a SQL statement? Also, I would lke to know how to add it in the table class.
Recently I wanted to get a list of all cached queries and their texts. Here's how to do that.
First create an SQL Procedure returning Cache Query text from a Cached Query routine name:
Class test.CQ
{
/// SELECT test.CQ_GetText()
ClassMethod GetText(routine As %String) As %String [ CodeMode = expression, SqlProc ]
{
##class(%SQLCatalog).GetCachedQueryInfo(routine)
}
}And after that you can execute this query:
SELECT Routine, test.CQ_GetText(Routine)
FROM %SQL_Manager.CachedQueryTree()And get a list of Cached Queries:
.png)
I'm facing a challenge in dynamically generating SQL queries based on incremental q_ids for a project I'm working on. Here's the scenario:
log_reports that contains logs of service activities, including timestamps and associated q_ids.Hello Community,
I have encountered the following SQL problem trying to create a table from a SELECT statement.
I narrowed the problem down to the following example:
1. The SELECT statement alone works as expected.
SELECT m.Name, h.Status FROM EnsLib_HL7.Message m, Ens.MessageHeader h WHERE h.MessageBodyClassName='EnsLib.HL7.Message' AND h.MessageBodyID = m.ID
2. But if "CREATE TABLE ... AS" is added it fails
CREATE TABLE UKEr.Test AS SELECT m.Name, h.Status FROM EnsLib_HL7.Message m, Ens.MessageHeader h WHERE h.MessageBodyClassName='EnsLib.HL7.Message' AND h.MessageBodyID = m.ID
In a customer project I was asked how you can keep track of database changes: Who changed what at which date and time. Goal was to track insert, update and delete for both SQL and object access.
This is the table that I created to keep the Change Log:
/// Changelog, keep track of changes to any table
Class ChangeLog.DB.ChangeLog Extends (%Persistent, %JSON.Adaptor)
{
/// Action
Property Action As %String(%JSONFIELDNAME = "action", DISPLAYLIST = ",Create,Update,Delete", MAXLEN = 1, VALUELIST = ",0,1,2");
/// Classname of the %Persistent class
Property ClassName As %String(%JSONFIELDNAME = "table", MAXLEN = "") [ SqlFieldName = TableName ];
/// ID of the record
Property DRecordId As %String(%JSONFIELDNAME = "id") [ SqlFieldName = RecordId ];
/// Name of the user that made the change
Property DUsername As %String(%JSONFIELDNAME = "user") [ SqlFieldName = Username ];
/// ISO 8601 formatted UTC timestamp e.g 2023-03-20T15:14:45.7384083Z
Property ETimestamp As %String(%JSONFIELDNAME = "timestamp", MAXLEN = 28) [ SqlFieldName = Timestamp ];
/// Changed Data (only there for Action < 2)
Property NewData As %String(%JSONFIELDNAME = "changed-data", MAXLEN = "");
/// Old Data (only there for Action > 0)
Property OldData As %String(%JSONFIELDNAME = "old-data", MAXLEN = "");
}
Hello Everyone,
The Certification Team of InterSystems Learning Services is 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 our InterSystems IRIS Developer Professional exam here.
How do I provide my input? Complete our Job Task Analysis (JTA) survey!