I'm trying to read the response to a long (indefinitely) running HTTP response with Transfer-Encoding: chunked. Ideally I'd be able to read the individual chunks from the response and do something with them as they arrive rather than needing to wait for the response to finish (because it never will) - ultimately I'm thinking to wrap these back up over a WebSocket connection which seems cleaner from an API perspective.

So far it looks like my options are:

1 3
0 688
Question
· Apr 1, 2023
NOT %INLIST

Hi.

I have a query:

SELECT '['||Material->Sifra||'] '||Material->Opis AS Material,
SUM(MasaBlago) AS MasaBlago
FROM Tehtanje.Dokument
WHERE DatumDokumenta BETWEEN '01/01/2023' AND '04/01/2023'
AND (Material->Sifra %INLIST $LISTFROMSTRING('5,7',','))
GROUP BY Material
ORDER BY %EXACT Material

The query returns all rows where Material->Sifra is 5 or 7. That's OK.

If I want to get all rows where Material->Sifra is NOT 5 or 7 I use query:

0 2
0 247
Question
· Mar 27, 2023
JSON Validation Errors

When using %JSONImport it seems to only report a single error, is there a way to report all the errors with out having to do multiple requests?

{

"errors": [

{

"code": 9406,

"domain": "%ObjectErrors",

"error": "ERROR #9406: Unexpected format for value of field, CurrencyCode, using Update mapping",

"id": "JSONImportError",

"params": [

"CurrencyCode",

"Update"

0 1
0 263

I've been working for some days in the connectivity between NodeJS client applications and IRIS as server using web sockets.

You can get all the information in relation to the web socket connections using IRIS as a client or as a server from this URL: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

3 2
0 297

Our ERP solution runs on different sql databases (such as ms sql and posgre). We are using the same code for all plattforms, doing database-specific changes in the db driver for each type of database.

There is one function in our program, where the user can store long text to discribe something, which is used in print and web. This text is treated/stored as html and can include pictures. The pictures in the html are stored base64 coded inside the html and the html is stored as text in a column. In other database systems, this is treated as TEXT or BLOB, and workings just fine.

1 6
0 264

*** archived ***

The question has come up several times and I saw mixed answers and no quick example

My personal preference is using CPIPE device as you get back exactly the output you will get at the command line interface of your OS .
The tricky thing is to stop reading in time.
The example just displays what you normally see in your console.
it becomes useful if you look for things that you can't get from any $system.whatever()

15 5
4 2.1K

Is anyone like me, and felt really jealous that they didn't have enough points to acquire the IRIS-based Raspberry Pi system when it was offered? Do you have a spare Raspberry Pi 4 handy? If so, I'll walk you through setting up Docker and IRIS on your Raspberry Pi so you can have the smallest IRIS computer in town!

Things you'll need:

8 0
0 439

WIN SQL is the normal editor used by most of the users .But we can't download large amount of data using winsql . So I have written a tutorial how to connect with a new Java based editor called Squirrel SQL which can easily download or export data in excel or any other formats. Also I included a Java JCBC connection program to connect with the IRIS database especially a mirroring/failover server.

3 5
0 358
Article
· Mar 29, 2023 1m read
Named Parameter In SQL with Python

Quick Tips: Total Productive Maintenance

Named parameters can be achieved with SQLAlchemy :

from sqlalchemy import create_engine, text,types,engine

_engine = create_engine('iris+emb:///')

with _engine.connect() as conn:
    rs = conn.execute(text("select :some_private_name"), {"some_private_name": 1})
    print(rs.all())

or with native api

from sqlalchemy import create_engine, text,types,engine

# set URL for SQLAlchemy
url = engine.url.URL.create('iris', username='SuperUser', password='SYS', host='localhost', port=33782, database='FHIRSERVER')

_engine = create_engine(url)

with _engine.connect() as conn:
    rs = conn.execute(text("select :some_private_name"), {"some_private_name": 1})
    print(rs.all())

6 0
0 354

InterSystems FAQ rubric

You can programmatically retrieve routine dates and sizes using the RoutineList query of the %Library.Routine (or just %Routine) class.

The RoutineList query has an argument, and the routine name to be searched can be specified by prefix match or middle match. (For wildcards, specify * or ?)

In the example below, *.MAC is specified as an argument.

5 2
0 409

Hi,

I know little about SOAP security and am trying to apply a WS-Policy to a simple HL7 web service, but when I do I get object script errors.

The most latest one being:

ObjectScript error: <UNDEFINED>zValidateTransport+4^%SOAP.Security.Policy.1 *%request

0 0
0 145
Announcement
· Mar 28, 2023
[Video] What is PEX

Hi Developers,

See how the Production Extension framework (PEX) allows you to build custom interoperability components in .NET or Java without first learning ObjectScript.

With PEX, you can code in a familiar language and take advantage of established code libraries to add components to a production.

What is PEX

https://www.youtube.com/embed/ggZUn8jtGLM
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

1 0
1 200
Article
· Feb 23, 2023 3m read
Publish / subscriber example in IRIS

Hi all!

In a project we needed to define topics to publish messages and register different subscribers which will receive those messages asynchronously. We also needed it to be as simple as possible and that we could use it on InterSystems IRIS directly.

As an experiment, I'm sharing this iris-pubsub open exchange example.

Infrastructure

This is built on top of InterSystems IRIS interoperability features, it needs a running production.

4 4
2 359

Hi Developers,

Often we create and edit InterSystems IRIS Interoperability solutions via a set of UI tools that is provided with IRIS. But it is sometimes difficult to setup the development environment to handle changes we make in the UI to source control.

This video illustrates how git-source-control helps with source control Interoperability components while changing it in the UI.

Git Source Control for InterSystems IRIS Interoperability with Docker and VSCode

https://www.youtube.com/embed/QIb2ksEXdHk?controls=0
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

3 0
2 499

If you are seeing this error during import: ERROR #6301 Line: 2 Offset: 118 This does not appear to be a Cache exported file, unable to import.

This error is caused by exporting from InterSystems IRIS and trying to import into Caché. If you plan on exporting from IRIS to Caché, you can use the following qualifier to export your classes so that Caché does not throw an error on import:

w $SYSTEM.OBJ.Export(<items>,<filename>,"/exportversion=cache2018.1")

7 3
0 740

If you are using Python, you can use the built-in venv module to create a virtual environment. This module is the recommended way to create and manage virtual environments.

A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated python virtual environments for them. It solves the “Project X depends on version 1.x but, Project Y needs 4.x” dilemma, and keeps your global site-packages directory clean and manageable.

So if like me you work a lot with Python, you can use the venv module to create a virtual environment for your project. This will allow you to install packages without affecting the global Python installation.

You will find here two neat alias to create and activate a virtual environment.

Python aliases

alias venv="python3 -m venv .venv; source .venv/bin/activate"
alias irisvenv="python3 -m venv .venv; source .venv/bin/activate; pip install https://github.com/grongierisc/iris-embedded-python-wrapper/releases/download/v0.0.3/iris-0.0.3-py3-none-any.whl"

9 3
2 1.2K

This is the second piece in our series on 2021.2 SQL enhancements delivering an adaptive, high-performance SQL experience. In this article, we'll zoom in on the innovations in gathering Table Statistics, which are of course the primary input for the Run Time Plan Choice capability we described in the previous article.

10 4
1 694

1.Background

1.1 I met a few project that their interface servers were crashed. Cutoms wanted resume server as fast as we can. their servers are running at lan,and they can't use git,there are some namesapce in the server running different service,and usualy there is only one server.

1.2 In the message,it has property in type of characterstream,as you know,the message search page doesn't support filtering with property of characterstream,so it's so hard to find the messge you want.

10 11
2 555