9 Followers · 1.1K Posts

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

Article Brendan Bannon · Dec 27, 2016 8m read

Mapping Examples

Clearly if you have a fourth article in the trilogy you need to go for the money grab and write the fifth, so here it is!

Note:  Many years ago Dan Shusman told me that mapping globals is an art form.  There is no right or wrong way of doing it.  The way you interpret the data leads you to the type of mapping you do.  As always there is more than one way to get to a final answer.  As you look through my samples you will see there are some examples that map the same type of data in different ways.

15
1 2767
Question Stefan Cronje · Dec 21, 2023

Hi,

The system I am working on processes large numbers of records. Inserts, updates and so forth. There are multiple processes that can potentially work on the same table at the same time. 

It is an almost impossible task to try and time these processes to not run at the same time, due to volumes, SLAs, etc.

Every now and then there are a few locking issues, Not many considering the volumes. It is just a bit of a nuisance as we need to reprocess these records later.

All the selects on the processes run at IsolationMode 0 and the transactions are kept as short as possible.

6
0 422
Question Michael Lundberg · Dec 20, 2023

Hello!

I wonder how to select a conditional value from a Table column that has lists of values?
Example: I have a table in the database that looks like below:

ID Itemname IDList
1 TestItem 1 7 10 17

For example, I want to know which Itemname it is for number 10 that is in the IDList. What should this SQL syntax look like? I have tried %INLIST and other things but only get blank value. How should the SQL-syntax for that query look like?

Greatful for all tips.
Regards,
Michael

4
0 1048
Article Anton Umnikov · Dec 4, 2020 7m read

IRIS External Table is an InterSystems Community Open Source Project, that allows you to use files, stored in the local file system and cloud object storage such as AWS S3 as SQL Tables. IRIS External Table

It can be found on Github https://github.com/intersystems-community/IRIS-ExternalTable Open Exchange https://openexchange.intersystems.com/package/IRIS-External-Table and is included in InterSystems Package Manager ZPM.

To instal External Table from GitHub use:

4
2 1306
Question Alexey Nechaev · Dec 4, 2023

Hi folks, 

I made a solution (https://openexchange.intersystems.com/package/iris-pretty-gpt-1) and want to use it like 

CREATEFUNCTION ChatGpt(INpromptVARCHAR)
RETURNSVARCHARPROCEDURELANGUAGE OBJECTSCRIPT
{
    return ##class(dc.irisprettygpt.main).prompt(prompt)
}


CREATETABLE people (
nameVARCHAR(255),
city VARCHAR(255),
age INT(11)
)


INSERTINTO people ChatGpt("Make a json file with 100 lines of structure [{'name':'%name%', 'age':'%age%', 'city':'%city%'}]")
6
0 449
Announcement Ronnie Hershkovitz · Nov 19, 2023

Hi Community,

We're pleased to invite you to the upcoming webinar in Hebrew: 

👉Advanced JSON & DocDB👈

📅 Date & time: November 29th, 3:00 PM IDT

JSON has become the leading language in interfaces in recent years. 

In this Webinar we will learn about the use of JSON Adapter and its mappings,

How to convert information from SQL to JSON in a single command, 

And how can information be saved as raw JSON without saving as an object in DocDB.

 Presenter:

@Keren Skubach, Senior Sales Engineer, InterSystems 

 ➡ Register today! 

1
0 328
Article Anna Diak · Nov 29, 2023 3m read

Intro

In a fast-paced digital era, effective communication is crucial. This article introduces a Java-based chat project, combining the strength of IRIS database and ChatGPT intelligence. Built on Java, it goes beyond real-time messaging, leveraging IRIS and ChatGPT for an enhanced chat experience. Also, the name of the project references the cultural classic - Star Wars.

Building Application

6
3 407
Announcement Olga Zavrazhnova · Nov 16, 2023

Hi Developers,
Our next online Developer Roundtable will take place on November 30 at 10 am ET | 4 pm CET.📍 

Tech talks:

1. Foreign Tables - by @Benjamin De Boe Manager, Analytics Product Management, InterSystems
2. Building "data products" with dbt and InterSystems IRIS - by @Thomas Dyar Product Manager, Machine Learning, InterSystems

We will have time for Q&A and open discussion.

▶ Update: watch the recording of the roundtable below:

  

5
0 389
Article Muhammad Waseem · Nov 16, 2023 9m read

Hi, Community!

This article is an overview of SQLAlchemy, so let's begin!

SQLAlchemy is the Python SQL toolkit that serves as a bridge between your Python code and the relational database system of your choice. Created by Michael Bayer, it is currently available as an open-source library under the MIT License. SQLAlchemy supports a wide range of database systems, including PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server, making it versatile and adaptable to different project requirements.

The SQLAlchemy SQL Toolkit and Object Relational Mapper from a comprehensive set of tools for working with databases and Python. It has several distinct areas of functionality which you can use individually or in various combinations. The major components are illustrated below, with component dependencies organized into layers:

_images/sqla_arch_small.png

8
4 1005
Question Anna Diak · Nov 29, 2023

I want to connect the app to Cloud SQL but when I registered and created the deployment (trial) I got the error:

Did anybody face such an error?
During the creation of an account, there was a message like 'username is taken' but the account have been created anyway. Maybe it could cause this problem.
 

5
0 279
Article Niels Genne · Nov 24, 2023 4m read

How can IRIS productions be deployed more quickly and with greater peace of mind?

The aim of interoperability productions is to enable you to connect systems in order to transform and route messages between them. To connect systems, you develop, configure, deploy and manage productions that integrate several software systems.

That’s what the InterSystems documentation on its reference website tells us, but what do you actually have to do to deploy a production ?

1
0 344
Article Andrii Mishchenko · Nov 23, 2023 2m read

GmOwl is a solution that offers an organized and engaging learning platform. It was developed to cater to the increasing need, for learning tools providing a versatile quiz environment that meets users requirements.

The main objective of GmOwl is to deliver an user experience for individuals participating in quizzes while giving administrators comprehensive control, over content and user engagement.

GmOwl uses Java EE with MVC template, and the InterSystems IRIS database is used to store data. The InterSystems JDBC Driver is used to connect to the database.

7
2 396
Question Ashok Kumar T · Oct 30, 2023

Hello Community

IRISTEMP database consumes more disk space and make the production instance down when running Bulk SQL queries (maybe other processes aswell)

Is setting up the "Maximum" size it resolves the problem?. Is this setting impacts the performance? 

What are the approaches to resolve it

sample screenshot

2
1 359
Article Alex Woodhead · Jun 12, 2023 3m read

This article is a simple quick starter (what I did was) with SqlDatabaseChain.

Hope this ignites some interest.

Many thanks to:

sqlalchemy-iris author @Dmitry Maslennikov

Your project made this possible today.

The article script uses openai API so caution not to share table information and records externally, that you didn't intend to.

A local model could be plugged in , instead if needed.

Creating a new virtual environment

7
3 3675
Question Robert Steed · Oct 23, 2023

This applies to embedded and dynamic SQL queries in Caché ObjectScript. If I attempt to terminate the process via Management Portal, nothing happens. Neither does Ctrl C nor closing the terminal window in which my program is running, nor setting a stop flag in a global which is read by the program on each loop iteration. The only way to stop the query appears to be restarting the Caché server (which is running locally on my PC).

6
0 772
Question Katrina E Rodenhaus · Oct 26, 2023

I am very new to IRIS. We are developing a PHP application that connects to an IRIS instance of one of our vendors. I am having trouble with a specific table. When I need to query this specific table for specific fields, I am receiving an error. However, if I change the call to get all columns (`*`), there is no error. I get 37K records returned.

Error:

4
0 602
Question Jun Suzuki · Aug 9, 2022

Following the documentation to insert into tableA from tableB in the SQL query box from the Management Portal :

INSERT INTO tableA (col1, col2)
SELECT col1, col2
FROM tableB

This straightforward query raises the following error :

Error #5475: routine compilation error : %sqlcq.TESTuNAMESPACE.cls305. Errors: %sqlcq.TESTuNAMESPACE.cls305.cls
ERROR: %sqlcq.TESTuNAMESPACE.csl305.1(14) :
<UNDEFINED>parseExtFrom+19^%qaqcmx
*mt("f", "1^TABLEA") :

Could someone help me decipher this error message ? Thanks for your help.

7
0 655
Article Dmitry Maslennikov · Aug 22, 2023 12m read

For the upcoming Python contest, I would like to make a small demo, on how to create a simple REST application using Python, which will use IRIS as a database. Using this tools

  • FastAPI framework, high performance, easy to learn, fast to code, ready for production
  • SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL
  • Alembic is a lightweight database migration tool for usage with the SQLAlchemy Database Toolkit for Python.
  • Uvicorn is an ASGI web server implementation for Python.
5
2 607
Question Ashok Kumar T · Sep 29, 2023

Hello Community,

I have couple of question about the DynamicSQL.

1. The %ObjectSelectMode is working perfectly in the DynamicSQL for the object property in direct query. However this is not supported for class query. Is there any way to resolve this / Get the object value for class query result.

2. What is the reason behind for a stored query prepared using %PrepareClassQuery() you must use the %Get("fieldname") method.

3
0 457