Hi Community,
Watch this video to see how to connect to InterSystems Cloud Services from your Java application using the InterSystems JDBC driver:
SQL is a standard language for storing, manipulating and retrieving data in relational databases.
Hi Community,
Watch this video to see how to connect to InterSystems Cloud Services from your Java application using the InterSystems JDBC driver:
Here're the technology bonuses for the InterSystems IRIS Cloud SQL and IntegratedML Contest 2023 that will give you extra points in the voting:
See the details below.
Within IRIS I defined a task to export audit data every day.
I provide some sample files in my GitHub repo.
I wrote ObjectScript code to import all files into otw.audit.consolidator class.
I want to use Python SQLAlchemy, pandas and sqlalchemy-iris (created by Dmitry Maslenikov) to copy consolidated audit data from my consolidator class in my IRIS container to my InterSystems Cloud SQL deployment.
I updated my Dockerfile to pip3 install sqlalchemy-iris and pandas (dataframes).
docker-compose build –no-cache in my personal AWS took 700 seconds.
.png)
Hi Community,
In this article, I will introduce my application iris-mlm-explainer
This web application connects to InterSystems Cloud SQL to create, train, validate, and predict ML models, make Predictions and display a dashboard of all the trained models with an explanation of the workings of a fitted machine learning model. The dashboard provides interactive plots on model performance, feature importances, feature contributions to individual predictions, partial dependence plots, SHAP (interaction) values, visualization of individual decision trees, etc.
I have Audit consolidator deployed in AWS where I scheduled Audit Export task to run daily.
Xml files are stored in mgr directory because the task runs in %SYS namespace.
/usr/irissys/mgr
-rwxrw-r--. 1 irisowner irisowner 249080 Apr 9 21:48 8eedba82d0ee_2023-04-09_auditexport.xml*
-rwxrw-r--. 1 irisowner irisowner 19487 Apr 10 00:02 8eedba82d0ee_2023-04-10_auditexport.xml*
-rwxrw-r--. 1 irisowner irisowner 23554 Apr 11 00:02 8eedba82d0ee_2023-04-11_auditexport.xml*
-rwxrw-r--. 1 irisowner irisowner 27624 Apr 12 00:02 8eedba82d0ee_2023-04-12_auditexport.xml*
-rwxrw-r--.
Data Initialization
1. Create a table with sql statements
create table IF NOT EXISTS MLTEST_MSG.HeightWeightPredictMSG (Id int primary key identity(101,2),number varchar(50), Height float, Weight float);
create table IF NOT EXISTS MLTEST_MSG.HeightWeightMSG (Id int primary key identity(101,2),number varchar(50), Height float, Weight float);
create table IF NOT EXISTS MLTEST_MSG.FamilyMSG(id int primary key identity(101,2),Csex int, Family float,Father float,Mother float, num int,Height float);
create table IF NOT EXISTS MLTEST_MSG.
Hey Developers,
We'd like to invite you to join our next contest dedicated to creating AI/ML solutions that use Cloud SQL to work with data:
🏆 InterSystems IRIS Cloud SQL and IntegratedML Contest 🏆
Duration: April 3 - April 23, 2023
Prize pool: $13,500
The SQL editor in the contest environment promises these features
InterSystems SQL Reference. .png)
But this is the reality:
I see no chance to have a different user.
Or did I miss something?
Or is this just fiction from ChatGPT ?
Hi all,
I'm trying to use LOAD DATA to insert 11k (11,377) rows of data. LOAD BULK DATA is not available for the version of IRIS I am using.
After calling LOAD DATA it says only 5,500 rows has been inserted. The LOAD DATA docs says any error rows are skipped and a count of skipped rows can be found in %SQL_Diag.Result however there are no results here. There are no errors in the xDBC error log either.
Why have over half the rows been skipped?
In the vast and varied SQL database market, InterSystems IRIS stands out as a platform that goes way beyond just SQL, offering a seamless multimodel experience and supporting a rich set of development paradigms. Especially the advanced Object-Relational engine has helped organizations use the best-fit development approach for each facet of their data-intensive workloads, for example ingesting data through Objects and simultaneously querying it through SQL. Persistent Classes correspond to SQL tables, their properties to table columns and business logic is easily accessed using User-Defined Functions or Stored Procedures. In this article, we'll zoom in on a little bit of the magic just below the surface, and discuss how it may affect your development and deployment practices. This is an area of the product where we have plans to evolve and improve, so please don't hesitate to share your views and experiences using the comments section below.
Assuming I have an SQL table with data, is it possible to get DML export (INSERT statements for this data)?
The ID of the last updated record can be obtained using the SQL function LAST_IDENTITY().
* This function can be used with embedded SQL or ODBC but not with Dynamic SQL, SQL Shell, or the Management Portal's SQL interface.
Here's an example of usage with simple Embedded SQL:
looking into tenants I see this:.png)
But on the main page, I have 2 deployments that I can work with !!
What is going on ??
I have an accepted tenant and want to share my deployment..png)
how is this possible?
On an IRIS system, we expect the default string collation for SQL columns to be SQLUPPER. This means WHERE conditions will be case-insensitive. However, when I make a WHERE condition on a SQL procedure that returns a string, it's case sensitive.For example:
ClassExtends%PersistentAsIf I query select * from Sample.Person where Name = 'abe lincoln', it will return results where name = "Abe Lincoln". If I query select * from Sample.Person where Sample.Person_Test() = 'abe lincoln', it will return no results.
Where is the default collation defined for SQL procedures?
Hi developers!
What is the way using SQL to list all the tables available in the current database/namespace?
Hi.
I have a query:
SELECT '['||Material->Sifra||'] '||Material->Opis AS Material,
SUM(MasaBlago) AS MasaBlago
FROM Tehtanje.Dokument
WHERE DatumDokumenta BETWEEN '01/01/2023' AND '04/01/2023'
AND (Material->Sifra %INLIST $LISTFROMSTRING('5,7',','))
GROUP BY Material
ORDER BY %EXACT Material
The query returns all rows where Material->Sifra is 5 or 7. That's OK.
If I want to get all rows where Material->Sifra is NOT 5 or 7 I use query:
SELECT '['||Material->Sifra||'] '||Material->Opis AS Material,
SUM(MasaBlago) AS MasaBlago
FROM Tehtanje.
Most of the databases with SQL access offers the DATE_TRUNC function or analogs. This helps to easily truncate a date by any part while keeping the DateTime in a valid format
.png)
In some testing scenarios, I need to clone the database. While I use only SQL access.
I need all data to be cloned, not mapped from the original database, and a separate database to be accessed.
Is there any way to do so?
Something like
CREATEDATABASEDatabaseIn the documentation Data Types | Caché SQL Reference | Caché & Ensemble 2018.1.4 – 2018.1.8 (intersystems.com)
it says that "by default, Caché establishes a system-wide ODBC VARCHAR maximum length of 4096; this ODBC maximum length is configurable"
Per instructions, I went to SMP -> System -> Configuration -> General SQL Settings, where most of the fields from $SYSTEM.SQL.CurrentSettings()
appear. That one does not.
How does one change it, and can it be increased?
Thanks!
[Cross-posted from https://groups.google.com/g/intersystems-public-cache/c/eRFeORb_sb0]
![]()
Named parameters can be achieved with SQLAlchemy :
from sqlalchemy import create_engine, text,types,engine
_engine = create_engine('iris+emb:///')
with _engine.connect() as conn:
rs = conn.execute(text("select :some_private_name"), {"some_private_name": 1})
print(rs.all())
or with native api
from sqlalchemy import create_engine, text,types,engine
# set URL for SQLAlchemy
url = engine.url.URL.create('iris', username='SuperUser', password='SYS', host='localhost', port=33782, database='FHIRSERVER')
_engine = create_engine(url)
with _engine.connect() as conn:
rs = conn.execute(text("select :some_private_name"), {"some_private_name": 1})
print(rs.all())
I am trying to pinpoint and troubleshoot an issue we have been seeing lately. We have several SQL Outbound Adapter Operations that are seeing issues trying to connect to our MS SQL Servers using the JDBC Gateway for calling insert, select, update, and stored procedure calls.
ERROR <Ens>ErrFailureTimeout: FailureTimeout of 20 seconds exceeded in osuwmc.Visit.
We are migrating to new servers, and I need to copy the information from Business Partner's over to the new server. Is this information in a Global or SQL table somewhere that I can export and import into the new IRIS environment?
Thanks
Scott
Say you have a receiving system that accepts HL7 and provides error messages in field ERR:3.9 in the ACK it returns. You require a different reply code action depending on the error message, however the Reply Code Actions settings for the operation do not provide this level of granularity. One option could be to create a process that takes the ACK and then completes the action you were expecting, however things can get a bit messy if the action is to retry the message, especially when trying to view a message trace.
This is the second piece in our series on 2021.2 SQL enhancements delivering an adaptive, high-performance SQL experience. In this article, we'll zoom in on the innovations in gathering Table Statistics, which are of course the primary input for the Run Time Plan Choice capability we described in the previous article.
Hi Community,
I am trying to save data into SQL table but each entry getting saved twice in the SQL table. Is there any reason data is saving Twice in the SQL table
I have created a %Persistent class for the fields
Please find the business operation below
Class Patient.DBOperation Extends Ens.BusinessOperation
{
Parameter ADAPTER = "EnsLib.SQL.OutboundAdapter";
Property Adapter As EnsLib.SQL.OutboundAdapter;
Parameter INVOCATION = "Queue";
Method OnMessage(pInput As Patient.PatientDBReq, pOutput As Ens.Response) As %Status
{
Set Entry=##class(Patient.PatientDBReq).%New()
Set Entry.
Hi Community,
Enjoy watching the new video on InterSystems Developers YouTube:
⏯ Querying 6 Terabytes of Protected Health Information at Northwell @ Global Summit 2022
.png)
One of the reasons why I love Cache and Iris is that not only you can do anything you can imagine, also you can do it in a lot of different ways!!.
Imagine that you have an integration running with IRIS connected by ODBC you probably only run SQL queries but you can also create stored procedures and inside write the code to do everything you can imagine.
I'm going to give you some examples but the limit is your imagination!!
You might wonder, wait! I don't know how to create a store procedure in IRIS.
This article is intended to be a simple tutorial on how to create ODBC connections and working with them, since I found starting with them a little bit confused, but I had amazing people to take my hand and walk me through it, and I think everyone deserves that kind of help too.
I'm going to divide each little part in sections, so feel free to jump to the one you feel the need to, although I recommend reading everything.
I'm going to use the sample data created in a previous article, Quick sample database tutorial: Samples.PersistentData, with the properties Name and Age.
I need a stored procedure where I can execute multiple delete from statements.
This will work to create a stored procedure, but when I add in other delete from, get error invalid sql statements when try to create
CREATE PROCEDURE DeleteSpecimenTwo
(IN Specno VARCHAR(50))
BEGIN
DELETE FROM PCONT WHERE PSPECNO = :Specno;
END;
This doesn't work
CREATE PROCEDURE DeleteSpecimenTwo
(IN Specno VARCHAR(50))
BEGIN
DELETE FROM PCONT WHERE PSPECNO = :Specno;
DELETE FROM PSPEC WHERE PSPECNO = :Specno;
END;
Any suggestions
Thanks
Louie