发布新帖

查找

问题
· 22 hr 前

Data Repoint NULLS Data In New Class Table When Old Class Property Is Changed & Saved

We are attempting to "Repoint" old class data to new class data to save disk space and data redundancy across multiple tables. This works to a point.  In essence the two classes are sharing the same data / Index / stream globals.  But if an ID in the Old_Class is opened, a property is modified, and saved the property that is in the New_Class (but not in the Old_Class) is NULLed / blanked.

Simplified explanation of data and what’s occurring.

Old Class Values   New Class Values
First_Name John   First_Name John
Middle_Initial Q   Middle_Initial Q
Last_Name Public   Last_Name Public
Date_Of_Birth 1/1/1965   Date_Of_Birth 1/1/1965
SSN 123-45-6789   SSN 123-45-6789
      Marital_Status Married

When the Old_Class is opened and any field in the Old_Class is modified and a %Save is run the Marital_Status becomes NULL / Blank.

Why does a %Save on the Old_Class result in a NULL / Blank value in the data storage global and in the New_Class table?  We have already checked Journaling and it sets a null into the $List position for "Marital_Status".

Is there a means to open the record via the Old_Class alter a property value, and perform a %Save without “losing” the value in the Marital_Status field in the New_Class?

9 条新评论
讨论 (9)3
登录或注册以继续
文章
· 23 hr 前 阅读大约需 12 分钟

Agentes de IA do Zero - Parte 2: Dando um Corpo ao Cérebro

cover

Na Parte 1, estabelecemos a base técnica do MAIS (Multi-Agent Interoperability Systems). Conectamos com sucesso o "Cérebro", construímos um Adapter robusto usando LiteLLM, protegemos nossas chaves de API com o IRIS Credentials e, finalmente, deciframos o código do quebra-cabeça da interoperabilidade com Python.

讨论 (0)1
登录或注册以继续
文章
· 二月 17 阅读大约需 4 分钟

Las Vegas to Los Angeles Bus Travel Guide & Best Deals

Traveling from Las Vegas to Los Angeles is one of the most popular road journeys in the United States. Every day, thousands of tourists, students, workers, and weekend travelers move between these two iconic cities. One city offers nonstop entertainment and nightlife, while the other delivers beaches, culture, and endless opportunities.

讨论 (0)1
登录或注册以继续
公告
· 二月 17

Top InterSystems Developer Community Authors of 2025

Hey Developers,

It's time to announce the Top InterSystems Developer Community Authors of 2025 🎉

We are pleased to reward the most active contributors across all regional DC sites (EN, ES, PT, JP, CN, and FR):

  • Breakthrough of the Year
  • Top Best-Selling Authors
  • Top Experts
  • Top Opinion Leaders

Let's look at the DC Wall of Fame of 2025 and greet everyone with big applause! 👏

Badge's Name Winners DC Winners InterSystems
 
Nomination: Breakthrough of the Year
Breakthrough of 2025

  

@Vachan C Rannore
@Harshitha
@Andrew Sklyarov
@Arsh Hasan
@Stav Bendarsky

@Liam Evans
@Derek Gervais
@Beatrice Zorzoli
@Thibault Odor
@Marco Bahamondes

 
Nomination: InterSystems Best-selling Author
1st place: 
Gold Best-Selling Author

  

@Heloisa Paiva

@Luis Angel Pérez Ramos

2nd place: 
Silver Best-Selling Author

  

@Yuri Marx

@Hiroshi Sato

3rd place: 
Bronze Best-Selling Author

  

@姚 鑫

@Guillaume Rongier

Best-Selling Author

  

@sween
@Ashok Kumar T 
@Iryna Mykhailova 
@Muhammad Waseem 
@Robert Cemper 
@Julio Esquerdo 
@Dmitry Maslennikov 

@Megumi Kakechi
@Sylvain Guilbaud 
@Toshihiko Minamoto 
@Ricardo Paiva 
@Evgeny Shvarov 
@Jose-Tomas Salvador 
@Mihoko Iijima 

 
Nomination: InterSystems Expert
1st place: 
Gold Expert

  

@Enrico Parisi  

@Luis Angel Pérez Ramos

2nd place: 
SilverExpert

  

@Robert Cemper

@Alexander Koblov

3rd place: 
Bronze Expert

  

@Jeffrey Drumm

@Brett Saviano
@Eduard Lebedyuk

DC Expert

  

@Julius Kavay
@John Murray
@David Hockenbroch
@Ashok Kumar T 
@Robert Barbiaux 
@Stephen Canzano 
@Yaron Munz 

@Ben Spead 
@Timo Lindenschmid 
@Guillaume Rongier 
@Timothy Leavitt 
@Sylvain Guilbaud 
@Tani Frankel 

 
Nomination: InterSystems Opinion Leader
1st place: 
Gold Opinion Leader

  

@Robert Cemper

@Luis Angel Pérez Ramos

2nd place: 
Silver Opinion Leader

  

@Andre Larsen Barbosa

@Evgeny Shvarov

3rd place: 
Bronze Opinion Leader

  

@Dmitry Maslennikov

@Tani Frankel

DC Opinion Leader

  

@Yuri Marx
@Iryna Mykhailova 
@Ashok Kumar T 
@Enrico Parisi 
@Kurro Lopez 
@Muhammad Waseem 
@Henry Pereira 

@Guillaume Rongier
@Ben Spead 
@Eduard Lebedyuk 
@Alberto Fuentes 
@Sylvain Guilbaud 
@Danusa Calixto 
@Timothy Leavitt 

This list is a good reason to start following some of the great authors of the Developer Community ;)

BIG APPLAUSE TO OUR WINNERS!

Congratulations to all of you, and thank you for your great contributions to the InterSystems Developer Community in 2025! 

12 条新评论
讨论 (12)7
登录或注册以继续
文章
· 二月 17 阅读大约需 3 分钟

Uso de auditoría de Python para depuración de Python embebido

PEP 578 añadió hooks de auditoría de Python. Una gran variedad de eventos (carga de módulos, interacciones con el sistema operativo, etc.) generan eventos de auditoría a los que podéis suscribiros.

Así es como se hace. Primero, cread un hook de Python embebido:

Class User.Python
{

/// do ##class(User.Python).Audit()
ClassMethod Audit() [ Language = python ]
{
import sys
import time
def logger(event,args):
     if event=='import':
        module = args[0]
        print(f"Loading {module}")
        if module == "numpy":
            print(f"Module {module} forbidden. Terminating process in 3.")
            time.sleep(3)
            sys.exit(0)
     elif event in ('compile','exec'):
        print(f"{event}: {args}")
     elif event in ('code.__new__','open'):
        # do nothing for this event
        x=1
     else:
        print(f"{event}")

sys.addaudithook(logger)
}

}

En este ejemplo:

  • Terminamos el proceso si numpy comienza a cargarse
  • Mostramos el evento y sus argumentos para los eventos de compile/exec
  • Ignoramos los eventos de código
  • Registramos todos los demás eventos

Todo esto se escribirá en el STDOUT por defecto.

Para empezar la auditoría, basta con llamar a este método para registrar vuestro hook, o incluso podéis hacerlo automáticamente al iniciar el proceso (job):

%ZSTART
JOB
    new $namespace
    set $namespace = "%SYS"
    do ##class(User.Python).Audit()
    quit
LOGIN
    do JOB
    quit

Aquí tenéis un ejemplo de salida:

%SYS>:PY
Loading code
exec: (<code object <module> at 0x000001AB82A0F2F0, file "c:\intersystems\iris\lib\python\lib\code.py", line 1>,)
Loading traceback
exec: (<code object <module> at 0x000001AB82A173A0, file "c:\intersystems\iris\lib\python\lib\traceback.py", line 1>,)
Loading linecache
exec: (<code object <module> at 0x000001AB82A17A80, file "c:\intersystems\iris\lib\python\lib\linecache.py", line 1>,)
Loading tokenize
exec: (<code object <module> at 0x000001AB82A32030, file "c:\intersystems\iris\lib\python\lib\tokenize.py", line 1>,)
Loading token
exec: (<code object <module> at 0x000001AB82A323A0, file "c:\intersystems\iris\lib\python\lib\token.py", line 1>,)
compile: (b'lambda _cls, type, string, start, end, line: _tuple_new(_cls, (type, string, start, end, line))', '<string>')
exec: (<code object <module> at 0x000001AB82A32710, file "<string>", line 1>,)
sys._getframe
object.__setattr__
Loading codeop
exec: (<code object <module> at 0x000001AB82A32EA0, file "c:\intersystems\iris\lib\python\lib\codeop.py", line 1>,)
Loading __future__
exec: (<code object <module> at 0x000001AB82A472F0, file "c:\intersystems\iris\lib\python\lib\__future__.py", line 1>,)
 
Python 3.9.5 (default, May 31 2022, 12:35:47) [MSC v.1927 64 bit (AMD64)] on win32
Type quit() or Ctrl-D to exit this shell.
compile: (b'import iris', '<input>')
compile: (b'import iris\n', '<input>')
compile: (b'import iris\n\n', '<input>')
exec: (<code object <module> at 0x000001AB82A60870, file "<input>", line 1>,)
>>> import json
compile: (b'import json', '<input>')
compile: (b'import json\n', '<input>')
compile: (b'import json\n\n', '<input>')
exec: (<code object <module> at 0x000001AB82A60870, file "<input>", line 1>,)
Loading json
exec: (<code object <module> at 0x000001AB82A60DF0, file "c:\intersystems\iris\lib\python\lib\json\__init__.py", line 1>,)
Loading json.decoder
os.listdir
exec: (<code object <module> at 0x000001AB82A67710, file "c:\intersystems\iris\lib\python\lib\json\decoder.py", line 1>,)
Loading json.scanner
exec: (<code object <module> at 0x000001AB82A679D0, file "c:\intersystems\iris\lib\python\lib\json\scanner.py", line 1>,)
Loading _json
Loading json.encoder
exec: (<code object <module> at 0x000001AB82A71500, file "c:\intersystems\iris\lib\python\lib\json\encoder.py", line 1>,)
>>> x=1
compile: (b'x=1', '<input>')
compile: (b'x=1\n', '<input>')
compile: (b'x=1\n\n', '<input>')
exec: (<code object <module> at 0x000001AB82A60870, file "<input>", line 1>,)

Creo que esto os puede resultar útil para la depuración.

讨论 (0)1
登录或注册以继续