Nueva publicación

Encontrar

Anuncio
· 28 mayo, 2025

Conoced a los ganadores del Concurso de Programación con IA en InterSystems READY 2025 @ Tech Exchange.

¡Hola, comunidad!

¡Estamos encantados de anunciar que varios ganadores del Concurso de Programación con IA de InterSystems han sido invitados a presentar sus proyectos en el Tech Exchange durante InterSystems Ready 2025!

Acompañadnos el miércoles 25 de junio para descubrir soluciones innovadoras y reales creadas con InterSystems IRIS, IA, LLMs y tecnologías de agentes inteligentes, directamente de la mano de los desarrolladores que las hicieron posibles.

Ponente Demo
@Muhammad Waseem, Consultor técnico, Traverse Health

Próxima generación de aplicaciones autónomas de IA 

iris-AgenticAI

@Yuri Marx, Director, YM Services

Gestión del código fuente con IA privada e IRIS

langchain-iris-tool

@Eric Fortenberry, Analista Senior de Integración, AdventHealth

Una visión minimalista de la IA: exploración de incrustaciones y búsqueda vectorial con EasyBot

iris-easybot 

@Alena Krasinskiene, Responsable de Calidad y Experiencia del Cliente, Banksia Global

Agentes de IA como ciudadanos de primera clase en InterSystems IRIS

bg-iris-agent

@Henry Pereira, Tech Leader en BPlus tecnology
@Henrique Dias, Arquitecto sénior de plataformas, AI en Zendesk
@José Pereira, Ingeniero de datos en Shift

Comanda la tripulación: crea una tripulación de IA para automatizar tu trabajo

Facilis

Estos desarrolladores han creado soluciones innovadoras utilizando tecnologías de InterSystems IRIS, integrando IA, LLMs y agentes inteligentes para resolver desafíos reales.

No perdáis la oportunidad de ver estas demostraciones en vivo y conectar con las mentes que las hicieron posibles en Ready 2025.

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 28 mayo, 2025 Lectura de 4 min

Conectar Cloud SQL con DBeaver usando SSL/TLS

Con el lanzamiento de InterSystems IRIS Cloud SQL, recibimos cada vez más preguntas sobre cómo establecer conexiones seguras mediante JDBC y otras tecnologías de drivers. Aunque contamos con una documentación resumida y detallada sobre las tecnologías de los drivers, nuestra documentación no describe herramientas cliente individuales, como nuestra favorita personal, DBeaver. En este artículo, describiremos los pasos para crear una conexión segura desde DBeaver a vuestra implementación de Cloud SQL.

📺 Si preferís ver un vídeo en lugar de leer, echad un vistazo a este video en el que os guiamos por los pasos que se detallan a continuación.

Paso 0: Crear vuestra implementación

Primero, iniciad sesión en el Portal de Servicios en la Nube y cread una implementación de Cloud SQL. Lo único que debéis tener en cuenta es marcar la casilla para habilitar conexiones externas. Por lo demás, los ajustes por defecto deberían funcionar bien.

Paso 1: Instalar el certificado

Para conectar de forma segura, usaremos certificados que cifran todo lo que se envía a través de la red. Podéis descargar el certificado desde la página de detalles de la implementación, pulsando el botón "Obtener certificado X.509".

Luego, necesitáis almacenar este certificado en un almacén de claves confiable usando la utilidad keytool. Esto es una parte estándar de la infraestructura Java, por lo que no es nada específico de IRIS o DBeaver en este punto. Usad el siguiente comando para importar el certificado. La ubicación del archivo certificateSQLaaS.pem no importa después de ejecutar este comando, así que podéis eliminarlo de la carpeta de descargas una vez hecho. La ubicación del archivo keystore.jkssí importa, así que aseguraos de ejecutar el comando desde una carpeta que tenga sentido y esté protegida de desinstalaciones o actualizaciones, como por ejemplo un directorio cert dentro de vuestra carpeta de usuario. El parámetro -alias es opcional, pero útil si tenéis intención de reutilizar el mismo archivo keystore para almacenar varios certificados.

keytool -importcert -file path-to-cert/cert-file.pem -keystore keystore.jks -alias myDeploymentName

Para más detalles, echad un vistazo a la documentación. 

Paso 2: Crear un archivo SSLConfig.properties

A continuación, necesitáis indicarle al driver JDBC de IRIS cómo encontrar este keystore, lo cual se logra mediante un archivo SSLConfig.properties. Este archivo de texto simple debe colocarse en el directorio de trabajo del programa Java que abrirá la conexión JDBC. En Windows, esto es %LOCALAPPDATA%\DBeaver, que corresponde a C:\Users\<usuario>\AppData\Local\DBeaver. En Mac, suele ser /Applications/DBeaverEE.app/Contents/MacOS. Como alternativa, también podéis crear el archivo en otra ubicación y establecer la ruta completa en una variable de entorno llamada com.intersystems.SSLConfigFile.

En su forma más simple, este archivo solo necesita apuntar al keystore e incluir la contraseña. Tened en cuenta que la ruta a vuestro archivo keystore.jks debe estar correctamente escapada para que Java pueda leerla, por lo que en Windows deberéis usar dobles barras invertidas (\).

trustStore=/path/to/keystore/keystore.jks
trustStorePassword=keystore-password

Hay muchas configuraciones adicionales que podéis ajustar a través de este archivo, descritas en la documentación, incluyendo configuraciones con nombre, pero lo anterior es suficiente.

Paso 3: Crear vuestra conexión en DBeaver

Ahora que habéis instalado el certificado y especificado dónde puede encontrarlo el driver JDBC de IRIS, podéis crear vuestra conexión en DBeaver. Todas las configuraciones para la pestaña "principal" en el diálogo de creación de conexión se encuentran en la pantalla de detalles de la implementación, como se mostró arriba:

Lo único que queda por hacer es indicarle a DBeaver que active el cifrado, lo cual se logra configurando el "nivel de seguridad de la conexión" a 10 en la pestaña "Propiedades del controlador".

¡Eso es todo! Si hacéis clic en "Probar conexión", deberíais obtener un visto bueno o un mensaje de error útil. En este último caso, consultad este documento de solución de problemas si no está claro qué debéis cambiar.

Nota para usuarios de Mac

Si usáis Mac, parece que hay un error en DBeaver por el cual lo anterior puede no ser suficiente. La solución es poco convencional, pero funciona. En el campo Database/Schema, donde normalmente pondríais 'USER', debéis introducir esta cadena completa en su lugar:

USER:sslConnection=true;sslTrustStoreLocation=/pathToTruststore/truststore.jks;sslTrustStorePassword=123456;

Consejos por cortesía de @Rick Guidice 

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 28 mayo, 2025 Lectura de 6 min

Creating a Document Database

Hi everyone,

 

It's me again😁. As usual I would like to share something I study recently, and today, I would like to share about the document DB😁.

1st of all, let's go to the documentation https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GDOCDB_intro
Well, I must say, this one is much better to follow than the others, which I read before. 😭 Finally😭😭

 

Ok, let's start walking through it together

Here we go😀, we start a terminal from VSCode to connect to our IRIS

We are going to created Document DB demo.docpatient
 

 

1.1 Check the Document DB exist or not

In the terminal, run the following script to check if the Document DB demo.docpatient  exist or not

w $SYSTEM.DocDB.Exists("demo.docpatient")

If the Document DB exist, 1 will return,

If the Document DB does not exist, 0, will return.

 

1.2 Create a Document Database

If the return is 0, create a Document DB demo.docpatient by the following script

set docdb = ##class(%DocDB.Database).%CreateDatabase("demo.docpatient")

After running this script, the object docdb is pointing to the created Document DB demo.docdpatient.

You my check the property of the object docdb by the following script.

zw docdb

 

1.3 Check the Document DB class from VSCode

A class file demo.docpatien.cls is generated

Below is the generated class file look like

 

1.4 Check the Document DB by SQL

By using the SQL tool form the management portal

Run the following SQL in the Execute Query tab

SELECT * FROM demo.docpatient

 

You will found there table demo.docpatient with the following fields

ID, %Doc, %DocumentId, %LastModified

%Doc will be the field where the document will store

%DocumentId is the unique ID field of each document

%LastModified is the timestamp for last modification

 


2 Storing a Document into the Document DB

In this example, we assume we get a few JSON strings looks like below and would like to store into our document DB.

{"pid":"1","BirthDate":"2003-01-01","Gender":"F","Name":"kate"}
{"pid":"2","BirthDate":"2001-02-07","Gender":"M","Name":"liam"}
{"pid":"3","BirthDate":"2013-03-14","Gender":"M","Name":"mario"}

 

2.1 Define the Document Database Object for DB Access

Before writing the document into the Document db, we need to define an object to point to the Document db which we would like to access

Below are the common steps for defining a Document Database Object

2.1.1 Check the Document DB exist or not

In the terminal, run the following script to check if the Document DB demo.docpatient  exist or not

w $SYSTEM.DocDB.Exists("demo.docpatient")

 

2.1.2 Define the Document DB object by %GetDatabase()

If the database exist, you may define the Document DB object docdb by the following script

set docdb = ##class(%DocDB.Database).%GetDatabase("demo.docpatient")

 

2.1.3 Create Property for the Document DB

Now we plan to insert the following data into the document  

{"pid":"1","BirthDate":"2003-01-01","Gender":"F","Name":"kate"}

Before we insert the data, let’s go through the data 1st. By looking through the data, we might interest to create the index for certain fields. In this example, we would like to set the key "Name" as the index field.

 

Create Property for the Document DB

Run the following script for creating  a NON UNIQUE property Name for the Document DB

w docdb.%CreateProperty("Name","%String","$.Name",0)

 

Check the Document DB class from VSCode

You will find out that 2 extra lines are added to the class

These limes indicate an extra field is added to table (in SQL point of view) and index is added to this filed.

 

Check the Document DB by SQL

Now, switch to the management portal. Run the following SQL in the Execute Query textbox

SELECT * FROM demo.docpatient

You can see and extra field Name is added

 

2.1.4 Insert the Document into the Document DB

 

Insert the Document into the Document DB

To save the document into the Document DB demo.docpatient  we can run the following script

set val = docdb.%SaveDocument({"pid":"1","BirthDate":"2003-01-01","Gender":"F","Name":"kate"})

 

Check the result from VS code

Run the following script to check the Document DB size (number of documents contains in the DB)

write "Contains ", docdb.%Size(), !

 

Run the following script to check the list the documents data

write "Documents:  ", docdb.%ToJSON(), !

 

Check the result from SQL

Run the following SQL in the Execute Query tab

SELECT * FROM demo.docpatient

 

Insert the Document into the Document DB (the rest of them)

Insert the following 2 JSON string and check the result

set val = docdb.%SaveDocument({"pid":"2","BirthDate":"2001-02-07","Gender":"M","Name":"liam"})
set val = docdb.%SaveDocument({"pid":"3","BirthDate":"2013-03-14","Gender":"M","Name":"mario"})


 

3 Querying the documents in the Document DB

 

3.1 Getting the document by %DocumentId

 

After open the document DB, we are going to retrieve a document with the %DocumentId=2

You may try the following script

w docdb.%FindDocuments(["%DocumentId",2,"="]).%ToJSON()

 

3.2 Getting the document by %DocumentId with restrict request

Let’ try to get all the documents with %DocumentId < 3

w docdb.%FindDocuments(["%DocumentId",3,"<"]).%ToJSON()

This actually is doing a SQL search for the fields (property), which exist in the Documents DB table, in this example, we created a property Name in the pervious steps. Now we can make use of this property as a finding criteria.

Let’s try to get the documents with Name start with k

w docdb.%FindDocuments(["Name","k","%STARTSWITH"]).%ToJSON()

How about we would like to check out the %DocumentId by the Name start with m. The result should contain Name and %DocumentId and limit the result to 5

w docdb.%FindDocuments(["Name","m","%STARTSWITH"],["Name","%DocumentId"],{"limit":5}).%ToJSON()

 

3.3 Querying the document by SQL

 

Alternatively, we can query the document data by SQL

For example, we are going to retrieve a document with the %DocumentId=2

set sqlresult=docdb.%ExecuteQuery("SELECT %Doc FROM demo.docpatient where %DocumentId=2")

And then display the result

do sqlresult.%Display()

How about we would like to check out the %DocumentId by the Name start with k. The result should contain Name and %DocumentId and limit the result to 5

set sqlresult=docdb.%ExecuteQuery("SELECT Top 5 Name, %DocumentId  FROM demo.docpatient where Name %STARTSWITH 'k' ")

And then display the result

do sqlresult.%Display()

An alternative printing way

set sqlresult=docdb.%ExecuteQuery("SELECT Top 5 Name, %DocumentId  FROM demo.docpatient where Name %STARTSWITH 'l' ")
while sqlresult.%Next()  { do sqlresult.%Print() }

Or

set sqlresult=docdb.%ExecuteQuery("SELECT Top 5 Name, %DocumentId  FROM demo.docpatient where Name %STARTSWITH 'k' or Name %STARTSWITH 'm'  ")
while sqlresult.%Next()  { w "Name: "_sqlresult.%Get("Name")_", %DocumentId: "_ sqlresult.%Get("%DocumentId"),!}

 


4 Updating the documents in the Document DB

Replace the existing Document by document id

Now we would like to replace the 1st document with the following JSON string

 

Getting the document by %DocumentId

After open the document DB, we are going to retrieve a document with the %DocumentId=1, for checking the current data

You may try the following script

w docdb.%FindDocuments(["%DocumentId",1,"="]).%ToJSON()

 

Updating the document by %DocumentId

Now we would like to replace the 1st document with the following JSON string

{"pid":"1","BirthDate":"2003-11-01","Gender":"F","Name":"kateL"}

Try to run the following script

set val = docdb.%SaveDocument({"pid":"1","BirthDate":"2003-11-01","Gender":"F","Name":"kateL"},1)

View the result by making the query again

w docdb.%FindDocuments(["%DocumentId",1,"="]).%ToJSON()

 


I think that's all about my study😁 Enjoy!!😀

Comentarios (0)1
Inicie sesión o regístrese para continuar
Pregunta
· 28 mayo, 2025

Cómo usar EnsLib.SQL.InboundAdapter en tablas de IRIS

Hola comunidad,

Me preguntaba si sería posible usar algo como EnsLib.SQL.InboundAdapter con tablas en IRIS.

Esta biblioteca monitoriza cuándo se inserta un registro en una tabla de una base de datos externa, por lo que requiere un DSN para conectarse a dicha base de datos.

Mi objetivo es realizar una llamada a una API externa que tarda mucho tiempo, podría tardar casi una hora (o más) en completar sus procesos, pero no quiero bloquear el proceso principal.

Por eso estaba considerando que la producción original almacene los indicadores que necesita procesar en una tabla y, desde otra producción, monitorice cuándo se inserta un registro e invoque la API (con un tiempo de espera bastante largo) para procesarlo.

En resumen, quiero usar IRIS como un gestor de colas (similar a MSMQ) y que esté atento a los cambios para ejecutar un proceso.

¿Es posible acceder a las tablas de IRIS usando un InBoundAdapter?

¿Alguna sugerencia para lograr el mismo resultado? Es decir, tener un gestor de colas y procesar los datos a medida que entran en la cola.

Saludos cordiales
Kurro Lopez

2 nuevos comentarios
Comentarios (4)2
Inicie sesión o regístrese para continuar
Pregunta
· 28 mayo, 2025

How to use EnsLib.SQL.InboundAdapter in IRIS tables

Hi community.

I was wondering if it was possible to use something like EnsLib.SQL.InboundAdapter with tables in IRIS.

This library monitors when a record has been inserted into a table in an external database, so it requires a DSN to connect to that database.

My goal is to make a call to an external API that takes a long time, it could spend nearly an hour (or more) completing its processes, but I don't want to block the main process.

That's why I was thinking about having the original production store the indicators it needs to process in a table, and from another production, monitor when a record has been inserted and invoke the API (with a fairly high timeout) to process that record.

In short, I want to use IRIS as a queue manager (similar to MSMQ) and have it "listen" for changes to execute a process.

Is it possible to access IRIS tables using an InBoundAdapter?

Any suggestions for achieving the same result? That is, having a queue manager and processing as data enters the queue.

Best regards.
Kurro Lopez

2 comentarios
Comentarios (2)3
Inicie sesión o regístrese para continuar