検索

質問
· 2025年3月26日

"Bad value for type long" on select from PostgreSQL via EnsLib.SQL.OutboundAdapter

Here is my code:

Method getStocks(pRequest As Stock.Message.Req, Output pResponse As Ens.StreamContainer) As %Status
{
     s tSC = pRequest.NewResponse(.pResponse)
     q:$$$ISERR(tSC) tSC

     #dim pRS As EnsLib.SQL.GatewayResultSet

     s tSC = ..Adapter.ExecuteQuery(.pRS, "select jsonb_agg(s) #>> '{}' FROM prod.stocks s where s.""Warehouse"" = ?", pRequest.Warehouse)
     q:$$$ISERR(tSC) tSC

     s pResponse = ##class(Ens.StreamContainer).%New()
     s pResponse.Stream = ##class(%GlobalCharacterStream).%New()

     i pRS.Next() {
          d pResponse.Stream.CopyFrom(pRS.GetDataStream(1))
     else {
          s tSC = $$$ERROR($$$GeneralError"ResultSet is empty")
     }

     q tSC
}

I created BO with EnsLib.SQL.OutboundAdapter, created DSN and seated it in operation settings. I am using a postgresql-42.7.4 JDBC driver. When I ran it, I got an empty record set error in trace and next record in Java Gateway log:

Sent: (10:12:08:696) [Job number = -1] [ThreadID = 10]
  0000:  4A  13  7E  00  00  00  00  00  00  00  00  00  59  4D      J.~.........YM
  000E:  00  00  00  43  13  7E  00  02  52  00  65  00  6D  00      ...C.~..R.e.m.
  001C:  6F  00  74  00  65  00  20  00  4A  00  44  00  42  00      o.t.e. .J.D.B.
  002A:  43  00  20  00  65  00  72  00  72  00  6F  00  72  00      C. .e.r.r.o.r.
  0038:  3A  00  20  00  42  00  61  00  64  00  20  00  76  00      :. .B.a.d. .v.
  0046:  61  00  6C  00  75  00  65  00  20  00  66  00  6F  00      a.l.u.e. .f.o.
  0054:  72  00  20  00  74  00  79  00  70  00  65  00  20  00      r. .t.y.p.e. .
  0062:  6C  00  6F  00  6E  00  67  00  20  00  3A  00  20  00      l.o.n.g. .:. .

[Update 1] The problem is: Why does Java Gateway try to read a text (varchar) type field as a long type?

[Update 2] The reason is not in a big text value of the selected field. I tried to limit records for json and got the same error

3 Comments
ディスカッション (3)2
続けるにはログインするか新規登録を行ってください
記事
· 2025年3月26日 7m read

Génération des spécifications OpenAPI

Introduction

Une API REST (Representational State Transfer) est une interface qui permet de faire communiquer différentes applications entre elles via le protocole HTTP, en utilisant des opérations standard telles que GET, POST, PUT, et DELETE. Les API REST sont largement utilisées dans le développement de logiciels pour exposer des services accessibles par d'autres applications, permettant ainsi l'intégration entre différents systèmes.

2 Comments
ディスカッション (2)0
続けるにはログインするか新規登録を行ってください
記事
· 2025年3月25日 2m read

Workaround for scikit-learn 1.6.0 Incompatibility in IRIS 2024.3 AutoML

Introduction

In InterSystems IRIS 2024.3 and subsequent IRIS versions, the AutoML component is now delivered as a separate Python package that is installed after installation. Unfortunately, some recent versions of Python packages that AutoML relies on have introduced incompatibilities, and can cause failures when training models (TRAIN MODEL statement). If you see an error mentioning "TypeError" and the keyword argument "fit_params" or "sklearn_tags", read on for a quick fix.

Root Cause

  • scikit-learn updated to version 1.6.0, deprecating fit_params.
  • scikeras is no longer updating the "wrappers" for Tensorflow.
  • Installing these packages in IRIS 2024.3 without pinned dependencies leads to training errors.

Symptoms

You may encounter:

<TypeError>: got an unexpected keyword argument 'fit_params'

or

[%msg: <ERROR #5002: ObjectScript error: <PYTHON EXCEPTION> *<class 'AttributeError'>: 'super' object has no attribute '__sklearn_tags__' [^%ML.AutoML.Provider.1:%SYS]>]

during the model training phase.

 

Workaround: 

1. Uninstall Existing Packages (if needed)

pip uninstall scikit-learn xgboost keras ...

 

2. Install via Snapshot

pip install --index-url https://registry.intersystems.com/pypi/simple \
  --no-cache-dir \
  --target /path/to/iris/python \
  -r /path/to/requirementsSnapshot.txt

 3Verify

• Run your smoke tests to confirm no fit_params errors.

• Ensure scikit-learn is pinned at <1.6.0.

Alternative: Pin scikit-learn <1.6.0

If you prefer not to use the snapshot file, you can manually pin the version:

pip install scikit-learn<1.6.0 xgboost keras ...

This will work around the issue until XGBoost and Keras officially update their packages.

Next Steps

  • InterSystems has implemented changes to the AutoML code to solve the issue in future releases -- this is mostly an issue for older containers such as 2024.3, the first release to use the post-installation procedure to install IntegratedML.
  • InterSystems is issuing a customer alert for the IRIS 2024.3 ml containers (containers.intersystems.com/intersystems/iris-ml:2024.3), that references this article.
  • If you have questions or run into issues, feel free to comment below or reach out to your InterSystems support contact.

Additional Resources:

1 Comment
ディスカッション (1)2
続けるにはログインするか新規登録を行ってください
お知らせ
· 2025年3月25日

Open Call for User Insights Interviews

Are you a developer, data engineer, integration engineer, or data scientist who works hands-on with InterSystems products? 

We are conducting 30-45 minute interviews to understand your experience — how you started with InterSystems products, where you find helpful code samples, and how we can improve our products to better support your journey. 

If you’re interested, fill out a quick survey to share your contact info and experience.

If you're selected, we will schedule a session at your convenience between April 2 and May 8 for an interview based on the information you provide.

🎁 As a thank-you, interview participants will receive 10,000 Global Masters points!

Your feedback will directly help us improve your experience using InterSystems products and services.

Kindly note that the spots are limited. 

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
お知らせ
· 2025年3月25日

Appel aux entretiens d'opinion d'utilisateurs

Êtes-vous développeur, ingénieur de données, ingénieur d'intégration ou data scientist et travaillez-vous avec les produits InterSystems ? Nous menons des entretiens de 30 à 45 minutes afin de comprendre votre expérience : comment vous avez commencé avec les produits InterSystems, où vous trouvez des exemples de code utiles et comment nous pouvons améliorer nos produits pour mieux vous accompagner dans votre parcours.

Si vous êtes intéressé(e), répondez à un court sondage (en anglais) pour partager vos coordonnées et votre expérience.

Si vous êtes sélectionné(e), nous organiserons une session à votre convenance entre le 2 avril et le 8 mai pour un entretien basé sur les informations que vous nous fournirez.

En guise de remerciement, les participants à l'entretien recevront 10 000 points sur Global Masters !

Vos commentaires nous aideront directement à améliorer votre expérience avec les produits et services InterSystems.

Veuillez noter que les places sont limitées.

ディスカッション (0)1
続けるにはログインするか新規登録を行ってください