#InterSystems IRIS

19 Followers · 5.6K Posts

InterSystems IRIS is a Complete Data Platform
InterSystems IRIS gives you everything you need to capture, share, understand, and act upon your organization’s most valuable asset – your data.
As a complete platform, InterSystems IRIS eliminates the need to integrate multiple development technologies. Applications require less code, fewer system resources, and less maintenance.

Question Daniel Bertozzi · Apr 13, 2022

Recently our team have been getting requests to pickup a large amount of data from API nightly (e.g. using ODATA to loop through pages) and placing that into MS SQL databases.

My question is, what is considered the best practice to get data from API and route to external SQL database WITHOUT persisting any messages/traces etc?

At the moment my thinking would be to write a service that triggers an action once a day to an EnsLib.HTTP.OutboundAdapter, then map the HTTP response into a linked table (via method to keep the operation clean that managed the gateway on the way in and out of the

5
0 511
Discussion David Underhill · May 5, 2022

I am sure I came across this in the past with Cache and just saw this again in IRIS.

When rebuilding or swapping a DAT file for a database it retains the Resource of the DAT file, not the Resource of the Database it is being used for.

For instance, if I have a local Database called APP with a resource %DB_APP and I want to refresh the data from another Database called TEST that has a Resource %DB_TEST I can just copy the DAT file from the TEST folder to the APP folder.

No Database settings are changed and it is all done with either IRIS down or the databases dismounted.

If you now look at the

5
0 264
Question Matjaz Murko · Apr 29, 2022

Hi.

Is it possible to set in XData mappings (or any other way) to serialize the property value as display value rather than value it self?

Regards,
Matjaž

5
0 457
Question Steve Pisani · Apr 1, 2022

Hi

I have an a Ens.Request subclass (Invoice) that has a relationship property to another persistent class (InvoiceItems), with properties of its own and the inverse relationship defined referring back to Invoice. 

When building a DTL with these classes, the Relationship’s inverse relationship (Invoice, within InvoiceDetails) is displayed.   

Can this be hidden ? 

thanks

5
0 381
Discussion Ben Spead · May 3, 2022

This year at Global Summit we will have several members of the InterSystems internal applications team (AppServices) on site to present topics of interest to developers.  There will be General Sessions that we teach on a number of topics related to tools we're launching to the OEX, knowledge gained based on migrating our Caché app portfolio to InterSystems IRIS, best practices for following OWASP Top 10 with ObjectScript, and a survey of the application landscape offering services to our customers and prospects.  

As AppServices is in charge of 'eating our own dogfood' within ISC by using

9
0 290
Article Yuri Marx · Feb 21, 2022 6m read

Hi Community,

Imagine enabling your application to read text to your customer? This is now possible with the new IRIS feature, Embedded Python. With this new functionality IRIS can natively run any open source or commercial Python libraries natively. gTTS (https://pypi.org/project/gTTS/) is a free library that transforms text into audio using the Google Translate service.

How to

Just pass the text by parameter and gTTS returns an mp3 file with the text transformed into audio. That is, your application can play the audio of any text! See how to do it:

1.

2
2 502
Question Abraham Wasswa · May 1, 2022

Given I have a property 

Class All.AllBooks Extends %Library.Persistent
{

Property ID As %Integer;

Property Title As User.Book;

}

 

In the class method

ClassMethod GetABookById(id As %Integer) As %Status
{

SET MyBooks = ##class(All.Allbooks).%OpenId(id)

SET obj = {

     "ID" : (MyBooks.%Id())

     "Title" : (MyBooks.Title)

}

WRITE obj.%ToJSON()

Quit 1
}

 

How do Access the foreign key in JSON() data

7
0 680
InterSystems Official Bob Kuszewski · Apr 30, 2022

InterSystems is pleased to announce the release System Alerting & Monitoring (SAM) version 1.1.

What is SAM?

SAM marries IRIS’s standards-based Monitoring API and Log Monitor with familiar industry standard tools like Grafana and Prometheus to create a basic monitoring and alerting solution for IRIS clusters.

For more on SAM, see the System Alerting and Monitoring Guide.

What’s new in SAM 1.1?

You’ll notice performance improvements for the Grafana dashboard graphs, especially when working with large data sets.

3
0 472
Question Matjaz Murko · Apr 30, 2022

Hi.

I'm trying to serialize property of type %TimeStamp in SQL statement with JSON_OBJECT, but I get a raw string instead of JSON DateTime format string. %JSONExport method on the same object works fine.

Any ideas?

Regards,
Matjaž

3
0 321
Question John Klahn · Apr 28, 2022

Good afternoon,

I'm trying to take an unformatted social security number and insert the dashes into it.  I'm getting a value in PID-19 like this:  "123456789" and would like to use a data transformation to set the value in PID-19 to "123-45-6789". 

I can't find any insert or append functions and I can't find anything in the Intersystems doc repository that would do this.

12
0 793
Question Brandon Butler · Apr 27, 2022

Has anyone here successfully connected to a community edition version of IRIS through port 22 to localhost? I have been trying for hours and hours to connect a Mobaxterm terminal session to IRIS and am at a total loss. Im not sure if port 22 isnt opening at this point or if its a configuration issue on my part. I am seeing either "Remote side unexpectedly closed network connection" or "connection refused" when i try to run the SSH session. I have tried 22/51773/1972 etc port settings under add/edit server to no avail. Any help is appreciated. Thanks.

Mobaxterm settings

host = localhost   user =

1
0 859
Article Mario Sanchez Macias · Apr 27, 2022 3m read

From time to time, we get the previous question in support, something or someone is using more licenses than expected, and we need to find what. 

We have two scenarios. The first scenario is when we realize that the licenses are exhausted when the application does not work or when we try to connect through the terminal and get the "lovely"

<LICENSE LIMIT EXCEEDED> message: 

The second scenario is when the end-user complains they could not use the application at some time, and we are late to see the problem when it is happening.

1
0 982
Question Michael Lundberg · Apr 26, 2022

Hello

We have a solution with an EnsLib.EMail.InboundAdapter as services that scan a mailbox on incoming mail with attachments.

When a new email arrives, the service sends the request (with a property %Net.MailMessage) to the process. In the process, we try to loop through and retrieve part 2 which we assume is the file.

set Part = pRequest.Mail.Parts.GetAt (2)

We can read out the file name:
Set FileName = Part.FileName

But how, and is it possible, to save the attached file to disk drive?

I do not see any method that supports that in that class.

Or must we use% Net.POP3 to receive and store the file?


G

4
0 421
Question Timothy Leavitt · Apr 25, 2022

I have a .woff2 file I'm trying to serve over CSP.

If I set:
^%SYS("CSP","DefaultFileCharset")="UTF8"

Then it "just works" - but I'd rather not do something so heavy-handed/instance-wide, on principle. (This is for something that will ultimately be published on the Open Exchange.)

A more granular option, it seems, is described in the %CSP.StreamServer class reference:

if you need to define settings per extension (in uppercase) you can use ^%SYS("CSP","MimeFileClassify",$zcvt(ext,"U"))=$listbuild(type,bin,charset) where:

  1. type - Content Type value, e.g. 'text/javascript'
  2. bin - 1 if this is binary
2
0 366
Question Tom Bruce · Apr 25, 2022

Hi everyone, how do you run multiple quires?

I have tried couple of different ways, but not working.

 SET sql = 2

    Set sql(1) = "UPDATE QUERY"

    Set sql(2) = "UPDATE QUERY"

    Set sqlStatement=##class(%SQL.Statement).%New()

    Set sc1=sqlStatement.%Prepare(.sql)

    If $$$ISOK(sc1)     {

       Set tResult = sqlStatement.%Execute()    

    }

    else{

        $$$LOGERROR("Failed")

    }

4
0 1916
Article Nicholai Mitchko · Apr 12, 2022 7m read

Programmatic Production Access

To Programmatically Edit Productions (interfaces) you can use a combination of the interoperability apis and SQL queries.

Current Namespace

At a high level, it is important to know the namespace and production you are working in at the moment.

// Object script 
// The active namespace is stored in this variable
$$$NAMESPACE 
// Print namespace
Write $$$NAMESPACE
# Python
import iris
# The active namespace is returned from this method
iris.utils._OriginalNamespace()
# Print namespace
print(iris.utils._OriginalNamespace())
>>> DEMONSTRATION

Current Production (active

3
4 1073
Question Andy Stobirski · Apr 21, 2022

Hi

I'm using an embedded SQL statement with a a cursor-based Embedded SQL query that uses host variables in the where clause, however, what I'm doing doesn't seem to work. Can anyone help?

The code I'm using is

set tMessageName = "AssessmentsMessage"
set tIdentifier = "SectionCode" 
set ID = 0
&sql(
    Declare IDs Cursor For 
    select  %ID
    INTO :ID
    from GMECC_DocmanConnect_Tables.ParisConnecMessagetSettings
    Where  MessageName = :tMessageName
    and Identifier = :tIdentifier
)

&sql(Open IDs) For {
   &Sql(fetch IDs) If SQLCODE Quit // SQLCODE = 100, now rows found
15
0 436
Question Megumi Kakechi · Apr 21, 2022

I tried to convert IRIS globals to pandas  dataframe.

I can do it as follows if there are no Japanese included in globals,

USER>zw ^ISJ2
^ISJ2=4
^ISJ2(1)=$lb("Name","Age","Address")
^ISJ2(2)=$lb("Sato","50","Tokyo")
^ISJ2(3)=$lb("Kato","40","Osaka")
^ISJ2(4)=$lb("Ito","30","Kyoto")
 
USER>do $system.Python.Shell()
 
Python 3.9.5 (default, Jan 31 2022, 17:55:36) [MSC v.1927 64 bit (AMD64)] on win32
Type quit() or Ctrl-D to exit this shell.
>>> mysql = "select name,value from %library.global_get('user','^ISJ2',,2,2)"
>>> resultset = iris.sql.exec(mysql)
>>> dataframe =
2
0 400
Question Megumi Kakechi · Apr 18, 2022

How can I get the Python error object(exception return value) from the embedded python method?
I have an embedded Python method like as below;

ClassMethod test2() As XXX [ Language = python ]
{
   try:
    a=1/0
   
   except Exception as ex:
    print("Exception: %s" % str(ex))
    return ex
}

I'm not sure what kind of return type to set for this classmethod.   "As XXX" <--
I tried to set "ClassMethod test2() As %Exception.PythonException [ Language = python ]"
However, I got the following return value when I run the method in the IRIS terminal.

USER>set st=
9
2 949