9 Followers · 1.1K Posts

SQL is a standard language for storing, manipulating and retrieving data in relational databases.

Article Eduard Lebedyuk · Feb 10, 2023 6m read

In this article, we will establish an encrypted JDBC connection between Tableau Desktop and InterSystems IRIS database using a JDBC driver. While documentation on configuring TLS with Java clients covers all possible topics on establishing an encrypted JDBC connection, configuring it with Tableau might be a little bit tricky, so I decided to write it down.

Securing SuperServer

Before we start with client connections, you need to configure SuperServer, which by default runs on port 1972 and is responsible for xDBC traffic to accept encrypted connections. This topic is described in the documenta

  1. image

3
2 845
Article Dmitry Maslennikov · Apr 19, 2023 2m read

Apache Superset is a modern data exploration and data visualization platform. Superset can replace or augment proprietary business intelligence tools for many teams. Superset integrates well with a variety of data sources.

And now it is possible to use with InterSystems IRIS as well.

An online demo is available and it uses IRIS Cloud SQL as a data source.

4
0 1118
Article Evgeny Shvarov · Apr 12, 2023 3m read

Hi Developers!

There is a recent update came for developer community images of InterSystems IRIS and IRIS For Health.

This release comes with Environment variables support.

Currently 3 variables are supported:

  • IRIS_USERNAME=user to create
  • IRIS_PASSWORD=with password
  • IRIS_NAMESPACE=create namespace if doesn't exist

Here is what you can do - see below.

Start iris with your username and password created:

docker run --rm --name iris-sql -d -p 9091:1972 -p 9092:52773  -e IRIS_PASSWORD=demo -e IRIS_USERNAME=demo intersystemsdc/iris-community
1
1 843
Question water huang · Apr 23, 2023

 i use %SQLGatewayConnection to insert data to mysql from xml,when if the value`s ascii of any field in the sql equal to 57659 ,

ClassMethod Execute(sql, conn, Output msg) As%Status
{
    s$zt="Err"
    s msg=""
    k hstmt
    set sc=conn.AllocateStatement(.hstmt)
    set sc=conn.PrepareW(hstmt,sql) 
    
  if$$$ISERR(sc) quit sc
  //Execute statement
  set sc=conn.Execute(hstmt)
  if$$$ISERR(sc) 
  {
      k err
   Set xsc=conn.GetErrorList(hstmt,.err)
      set sc=conn.DropStatement(hstmt)
   ;Zwrite err
   Quit err
  }
    set sc=conn.DropStatement(hstmt)
    q$$$
1
0 283
Article Oliver Wilms · Apr 21, 2023 2m read

We have a rule to disable a user account if they have not logged in for a certain number of days. IRIS Audit database logs many events such as login failures for example. It can be configured to log successful logins as well. We have IRIS clusters with many IRIS instances. I like to run queries against audit data from ALL IRIS instances and identify user accounts which have not logged into ANY IRIS instance.

Instead of running queries against many IRIS instances, I developed audit-consolidator to consolidate audit data from many IRIS instances into ONE database table to run queries against th

1
0 234
Announcement Evgeny Shvarov · Apr 3, 2023

Here're the technology bonuses for the InterSystems IRIS Cloud SQL and IntegratedML Contest 2023 that will give you extra points in the voting:

  • IntegratedML usage
  • Online Demo
  • Article on Developer Community
  • The second article on Developer Community
  • Video on YouTube
  • First Time Contribution
  • Community Idea Implementation
  • IRIS Cloud SQL Survey

See the details below.<--break->

2
0 461
Article Oliver Wilms · Apr 21, 2023 1m read

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.

docker-compose up-d starts audit-c

1
0 233
Article Muhammad Waseem · Apr 17, 2023 4m read

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.

Prerequisites

  • You should h














image

6
1 475
Article Oliver Wilms · Apr 18, 2023 2m read

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--. 1 irisowne

0
0 169
Article Shanshan Yu · Apr 18, 2023 2m read

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.FamilyPredictMSG(id int primary key identity(101,2

0
1 247
Question Jack Boulton · Mar 16, 2023

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?

3
0 472
Article Benjamin De Boe · Sep 13, 2022 8m read

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.

6
0 1210
Question Pravin Barton · Apr 7, 2023

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:

Class Sample.Person Extends%Persistent
{

Property Name As%String;ClassMethod Test() As%String [ SqlProc ]
{
    return"Abe Lincoln"
}

} 

If 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() = '

2
0 462
Question Matjaz Murko · Apr 1, 2023

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.Dokument
 WHERE DatumDokumenta BETWEEN '

2
0 373
Question Dmitry Maslennikov · Apr 3, 2023

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

CREATEDATABASE [Databasetocreate]
WITHTEMPLATE [Databaseto copy]
1
0 326
Question Michoel Reach · Mar 28, 2023

In 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]

2
0 440
Article Guillaume Rongier · Mar 29, 2023 1m read

Quick Tips: Total Productive Maintenance

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())
0
0 579
Question Scott Roth · Mar 28, 2023

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.ADTDBWriteBusinessOperation; status from last attempt was ERROR <Ens>ErrOutConnectExpired: JDBC Connect timeout period (15) expired for 'jTDS-Visit-Dev'(jdbc:jtds:sqlserver://SQL-VD21:1739/Visit;instance=tp;domain=osumc;useNTLMv2=true;cach


0
0 372