New post

Find

Question
· Aug 28, 2025

Using a Linked Table (SQL) as a Filter in a Business Rule

I had a need for a Filter, but did not want to recreate the wheel by creating another Data Lookup Table, so instead I created a Linked Table that points to a MS SQL Table outside of IRIS.

Once I had the Linked Table, I created a Class Method Function that would query the Linked Table and return a 1 if a result came back.

ClassMethod CheckPDMProviderType(pInput As %String) As %Boolean
{
    set ExtDisplay = ""
 		&sql(SELECT SecurityGroup_k INTO :ExtDisplay
        FROM osuwmc_CPD_SQL.Ref_SecurityGroup WHERE PDMExtDisplay = 1 AND SecurityGroup_k = :pInput)
    if ExtDisplay = "" {
        quit 0
    }
    quit 1
}

However, it doesn't seem like the Results of the Class Method are coming back correctly 100% of the time.

Is there an easier way to use the Linked Table to filter within a Business Rule? Are we able to project Linked Tables to Data Lookup Tables?

1 Comment
Discussion (1)2
Log in or sign up to continue
Article
· Aug 28, 2025 12m read

Traçage des applications InterSystems IRIS à l'aide de Jaeger

Nous présentons ici le processus d'utilisation de la célèbre solution Jaeger pour tracer les applications InterSystems IRIS. Jaeger est un produit open source permettant de suivre et d'identifier des problèmes, en particulier dans les environnements distribués et de microservices. Ce backend de traçage, apparu chez Uber en 2015, a été inspiré par Dapper de Google et OpenZipkin de Twitter. Il a ensuite rejoint la Fondation Cloud Native Computing (CNCF) en tant que projet en incubation en 2017, avant d'obtenir le statut gradué en 2019.

Discussion (0)1
Log in or sign up to continue
Article
· Aug 28, 2025 4m read

Una guía para principiantes para crear tablas en SQL y verlas como clases

El artículo de la August Article Bounty en Global Masters llamó mi atención, y uno de los temas propuestos me pareció bastante interesante para tratarlo. Así que esto es lo que me gustaría contarles a mis estudiantes sobre las tablas en IRIS y cómo se relacionan con el modelo de objetos.

Ante todo, InterSystems IRIS cuenta con un modelo de datos unificado. Esto significa que, cuando trabajáis con datos, no estáis atados a un único paradigma. Los mismos datos pueden ser accedidos y manipulados como una tabla SQL tradicional, como un objeto nativo o incluso como un array multidimensional (un global).

Esto quiere decir que, cuando creáis una tabla en SQL, IRIS genera automáticamente una clase de objeto correspondiente. Y, cuando definís una clase de objeto, IRIS la pone automáticamente a disposición como una tabla SQL. Los datos en sí mismos se almacenan una sola vez en el motor de almacenamiento multidimensional de IRIS, que es muy eficiente. El motor SQL y el motor de objetos son simplemente diferentes “lentes” para ver y trabajar con los mismos datos.

Primero, veamos la correlación entre el modelo relacional y el modelo de objetos:

Relacional Objeto
Tabla Clase
Columna Propiedad
Fila Objeto
Clave primaria Identificador de objeto

No siempre hay una correlación 1:1, ya que podéis tener varias tablas que representen una misma clase, por ejemplo. Pero es una regla general.

En este artículo, hablaré sobre cómo crear una tabla listando sus columnas.

El enfoque más básico:

CREATE TABLE [IF NOT EXISTS] table (
   column1 type1 [NOT NULL], 
   column2 type2 [UNIQUE], 
   column3 type3 [PRIMARY KEY]
   ...
   [CONSTRAINT fKeyName FOREIGN KEY (column) REFERENCES refTable (refColumn)]
)

[ ] indican las partes opcionales.

Vamos a crear una tabla DC.PostType, que consiste en tres columnas: TypeID (clave primaria), Name y Description:

CREATE TABLE DC.PostType (
  TypeID        INT NOT NULL,
  Name          VARCHAR(20), 
  Description   VARCHAR(500),
  CONSTRAINT Type_PK PRIMARY KEY (TypeID)
)

Como resultado, obtendremos la siguiente clase después de ejecutar la instrucción SQL anterior:

/// 
Class DC.PostType Extends %Persistent [ ClassType = persistent, DdlAllowed, Final, Owner = {UnknownUser}, ProcedureBlock, SqlRowIdPrivate, SqlTableName = PostType ]
{

Property TypeID As %Library.Integer(MAXVAL = 2147483647, MINVAL = -2147483648) [ Required, SqlColumnNumber = 2 ];
Property Name As %Library.String(MAXLEN = 20) [ SqlColumnNumber = 3 ];
Property Description As %Library.String(MAXLEN = 500) [ SqlColumnNumber = 4 ];
Parameter USEEXTENTSET = 1;
/// Bitmap Extent Index auto-generated by DDL CREATE TABLE statement.  Do not edit the SqlName of this index.
Index DDLBEIndex [ Extent, SqlName = "%%DDLBEIndex", Type = bitmap ];
/// DDL Primary Key Specification
Index TypePK On TypeID [ PrimaryKey, SqlName = Type_PK, Type = index, Unique ];
Storage Default
{
<Data name="PostTypeDefaultData">
<Value name="1">
<Value>TypeID</Value>
</Value>
<Value name="2">
<Value>Name</Value>
</Value>
<Value name="3">
<Value>Description</Value>
</Value>
</Data>
<DataLocation>^B3xx.DXwO.1</DataLocation>
<DefaultData>PostTypeDefaultData</DefaultData>
<ExtentLocation>^B3xx.DXwO</ExtentLocation>
<IdFunction>sequence</IdFunction>
<IdLocation>^B3xx.DXwO.1</IdLocation>
<Index name="DDLBEIndex">
<Location>^B3xx.DXwO.2</Location>
</Index>
<Index name="IDKEY">
<Location>^B3xx.DXwO.1</Location>
</Index>
<Index name="TypePK">
<Location>^B3xx.DXwO.3</Location>
</Index>
<IndexLocation>^B3xx.DXwO.I</IndexLocation>
<StreamLocation>^B3xx.DXwO.S</StreamLocation>
<Type>%Storage.Persistent</Type>
}

}

Observaciones clave

  • TABLE DC.PostType se convierte en Class DC.PostType.
  • La clase Extends %Persistent,, lo que indica a IRIS que debe almacenar sus datos en la base de datos.
    VARCHAR se convirtió en %String.
  • VARCHAR se convierte en %String.
  • INT se convierte en %Integer.
  • La restricción PRIMARY KEY creó un Index con la palabra clave PrimaryKey.

Ahora podéis usar esta tabla/clase desde cualquiera de los dos lados, por ejemplo, usando SQL:

INSERT INTO DC.PostType (TypeID, Name, Description) VALUES (1, 'Question', 'Ask a question from the Community')

Hay mucho más sobre cómo crear tablas usando SQL, así que leed la documentación que se proporciona a continuación.

Discussion (0)1
Log in or sign up to continue
Announcement
· Aug 27, 2025

HealthShare Unified Care Record Fundamentals – Virtual September 15-19, 2025 - Registration space available

HealthShare Unified Care Record Fundamentals – Virtual* September 15-19, 2025

*Please review the important prerequisite requirements for this class prior to  registering.

  • Learn the architecture, configuration, and management of HealthShare Unified Care Record.
  • This 5-day course teaches HealthShare Unified Care Record users and integrators the HealthShare Unified Care Record architecture and administration tasks.
  • The course also includes how to install HealthShare Unified Care Record.
  • This course is intended for HealthShare Unified Care Record developers, integrators, administrators and managers.
  • This course is applicable for users of Unified Care Record.

SELF REGISTER HERE

Discussion (0)1
Log in or sign up to continue
Announcement
· Aug 27, 2025

[Video] Practical Cybersecurity Measures for Stronger Organizational Resilience

Hi Community,

We're super excited to share the new video in the "Rarified Air" series on our InterSystems Developers YouTube:

⏯ Practical Cybersecurity Measures for Stronger Organizational Resilience

This video gives the outlines of seven practical steps to raise organizational readiness for a security event:

  • enable multi-factor authentication;
  • monitor and restrict web activity;
  • deploy endpoint detection and response (EDR);
  • pre-establish a partnership with a cybersecurity firm;
  • create a clear incident communication plan;
  • run cross-functional tabletop exercises;
  • study the NIST Cybersecurity Framework.

It also encourages building a security culture through interest groups, events, and dedicated communication channels.

🗣 Presenter: @John Paladino, Vice President of Client Services, InterSystems

Enjoy watching, and subscribe for more videos! 👍

Discussion (0)1
Log in or sign up to continue