0 Followers · 1.1K Posts

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

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 714
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 558
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 631
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 545
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 425
Article Robert Cemper · Sep 26, 2023 1m read

The related package avoids adding %JSONAdaptor to each class but uses  instead   
SQL functions JSON_OBJECT() to create my JSON objects. With this approach, you can   
add JSON to any class - even deployed ones - without any need for change or recompiling.

The trigger was the Export of M:N relationships  as JSON  objects or arrays.

0
0 431
Question Christine Nyamu · Sep 14, 2023

I need to run a SQL query and use the output to map PV1 7.1. The query is :

SELECT ID
FROM TestTable
WHERE ProviderName = 'TEST,PROVIDER' AND IDType= 'BPI'

When I run this query with the 'TEST PROVIDER'  I do pull the ID in question but I can't figure out how to do it from the DTL given that there are various providers sent in PV 1 7 . Any assistance will be greatly appreciated. 

8
0 493
Article Oleksandr Zaitsev · Sep 17, 2023 2m read

Enhanced Password Management: Edit Passwords Seamlessly

In the ever-evolving landscape of digital security, robust password management tools have become indispensable. Our password management application, designed to simplify and secure your online life, now comes with an enhanced feature – the ability to edit passwords with ease.

Why is this feature a game-changer?

0
0 281
Question Katrina E Rodenhaus · Sep 14, 2023

I am very new to IRIS. We are developing a PHP application that connects to an IRIS instance of one of our vendors. This works well most of the time, but when I query a table to get data from particular fields that contain long text strings, it returns `NULL`. These fields are all `VARCHAR(30000)`.

I tried using the `$extract` functionality in the IRIS documentation, but that made no difference. I also tried setting the PHP setting `odbc.defaultlrl` to both 31K and 0. Neither resolved the issue.

I also looked through the internet to try and find a similar issue, but wasn't able to find anything

1
0 351
Article Mihoko Iijima · Sep 14, 2023 1m read

InterSystems FAQ rubric

It can be retrieved using the schema INFORMATION_SCHEMA.

INFORMATION_SCHEMA is a system schema and is not displayed by default in the SQL menu of the Management Portal.

The method to display it is as follows.

  1. Open Management Portal → System Explorer → SQL menu.
  2. Check "System" on the left of the schema drop-down.
  3. Select INFORMATION_SCHEMA from the schema dropdown.

The SQL to get the ID, field name (COLUMN_NAME), data type (DATA_TYPE), description (DESCRIPTION) for the specified table (Sample.Human) is as follows.

0
1 621
Discussion Sylvain Guilbaud · Sep 11, 2023

Currently, the SQL privileges (SELECT, INSERT, UPDATE, DELETE) are managed at the tables level, which can be very tedious when you have to administer many roles in an organization, and need to keep them sync with a constantly evolving data models.
By managing privileges at the schemas level, will allow to give SELECT and other DML privileges to *all* or *several schemas* to a role|user, fixing the need to manually synchronize the new tables|views to the roles.

If you agree, I invite you to vote for this idea.

6
0 311
Discussion Dmitry Maslennikov · Sep 1, 2023

In today's landscape, enterprises have grown substantially in scale, amassing vast amounts of data. This data is collected from a plethora of sources including different applications, databases, and other channels. Given the diversity and volume of this data, it's only logical for these enterprises to seek a deeper understanding of what their data entails. Some of the data can be stored in IRIS, and it can be reasonable to be able to add this data to a data lake too.

The Internet now offers many different tools for such tasks, that do not yet support IRIS, but it's achievable. 

7
0 604
Question Gautam Rishi · Sep 8, 2023

Hi all,
I am trying to execute a query like the below code.
set statement = ##class(%ResultSet).%New("some_class:query_method").   // here query method is empty and with rowspec some columname

statement.Execute(param1)

I want to fetch data type of column value returned from above. eg - Name - VARCHAR, amount - INTEGER etc.
How can I get it. Or if not possible directly. Is there any other way to validate or get datatype of values returned. Line we have type() in python3

5
0 1331
Announcement Patrick Jamieson · Mar 15, 2021

Hi developers,

We have received quite a lot of interest in using SQL on FHIR data. As you know, FHIR data is encoded in the form of a complex directed graph, and thus you can not easily query it with traditional SQL queries or business intelligence tools. Some customers have noticed that the "FHIR search tables" in IRIS for Health have flattened part of the FHIR graph, and have tried to use them for analytics. This is an undocumented and unsupported part of IRIS for Health, and can change without notice.

1
0 431
Question Sylvain Guilbaud · Sep 8, 2023

Hello,

I have a global whose structure is multi-level and I am trying through a class and a SQL query to display a table which includes all the values ​​and levels.

^AFO("Site","Ville")="66722,3743"
^AFO("Site","Ville","111BB","OBT")=",MMM,XXX,"
^AFO("Site","Ville","111OW","OBT")=",XXX,MMM,"
^AFO("Site","Ville","AANVRBIBS","zzz")    =    "1^^1"
^AFO("Site","Ville","AANVRBIBS","zzz","*","dut")    =    "*afhalen waar gevonden"
^AFO("Site","Ville","AANVRBIBS","zzz","*","eng")    =    "*Pickup where found"
^AFO("Site","Ville","AANVRBIBS","zzz","*","fre")    =    "*Lieu où trouvé"

2
0 588
Question David Loveluck · Sep 6, 2023

on red hat, but I would also be interested in a wider answer.

after running a benchmark for 40 minutes, I have been asked if any rollbacks occurred in that time. Rollbacks from SQL or objects.

The application does not record this, so I am looking for a system level record.

The journal entries do the necessary reverse sets and commit just like any transaction. So i don't think i can detect them there.

4
1 490
Question Pedro Lopes · Aug 31, 2023

The program below works perfectly when I call it directly from the Terminal, however when I call it from within a CSP it does not work (It does not do the SELECT).

In the USER namespace, the program works both in the Terminal and on the CSP , but in another namespace it only works when called directly in the Terminal.

PropList(class) ;
 k pl S c=0 s class="'"_class_"'"
 K ^PropList s ^PropList=class
 S lista=$SYSTEM.SQL.Execute("SELECT * FROM Projet.GerePageCSP")
 while lista.%Next() {
 S c=c+1,pl(c)=lista.%Get("NomdePage")
 S ^PropList(c)=pl(c)
 }
 Q

________________________ CSP _______________________

4
0 296
Article Alex Woodhead · Sep 5, 2023 8m read

Overview

The online documentation contains a reference Defining and Using Class Queries -

Customizing Stored Procedures with ObjectScript directly has been useful to access NoSQL storage and external messaging via integration, to present output in tabular format.

For example: An application that already uses 90% SQL interaction from a front end, can then also extend this access to the other 10% of required platform functionality, via the same SQL access.

The purpose of this article is to explore how to achieve the same effect via Embedded Python methods.

0
0 437
Article Mihoko Iijima · Aug 31, 2023 1m read

InterSystems FAQ rubric

By specifying the start and end values ​​of the IDs for which you want to rebuild indexes in the arguments of the %BuildIndices() method provided in the persistent class (=table) definition, you can rebuild only the indexes within that range.

For example, to rebuild the NameIDX index and ZipCode index in the Sample.Person class only for ID=10 to 20, execute the following code (the ID range is specified in the 5th and 6th arguments). 

 set status = ##class(Sample.Person).%BuildIndices($LB("NameIDX","ZipCode"),1,,1,10,20
0
0 571
Article Heloisa Paiva · Mar 9, 2023 2m read

Introduction

In some of the last few articles I've talked about types between IRIS and Python, and it is clear that it's not that easy to access objects from one side at another. 

Fortunately, work has already been done to create SQLAlchemy-iris (follow the link to see it on Open Exchange), which makes everything much easier for Python to access IRIS' objects, and I'm going to show the starters for that.

Thank you @Dmitry Maslennikov !

Installing

To install, simply open your terminal with administrators' access and type

pip install sqlalchemy-iris
3
2 1769
Article Muhammad Waseem · Jul 6, 2023 2m read


 

The FHIR® SQL Builder, or Builder, is a component of InterSystems IRIS for Health. It is a sophisticated projection tool used to create custom SQL schemas using data in an InterSystems IRIS for Health FHIR repository without moving the data to a separate SQL repository. The Builder is designed specifically to work with FHIR repositories and multi-model databases in InterSystems IRIS for Health.

5
1 772