Hi everyone.

I have a function that may end up being called from a number of transformations at the same time, and within the function there's some Embedded SQL to first check if a local table has an entry, and then adds the entry if it doesn't exist.

To prevent a race condition where the function is called by two transformations and they both end up attempting to insert the same value, I'm looking to use the table hint "WITH TABLOCK" on the insert, but this seems to be failing the syntax checks within vscode.

Are table hints supported with embedded sql?

0 4
0 31

Hi,

i have this simple json structure:

{
"nTypeTrigger": "ATR",
"sDate": "2024-04-17 15:29:16",
"tRefArray": [{"sID":"132"},{"sID":"151"},{"sID":"233"}],
"tCountries": []
}

I can't find an example to iterate on tRefArray.

I've tried to create a secondary iterator but it doesn't work. Here is my current code:

0 3
0 43

Hello!

I wonder if anyone has a smart idea to extract an XML fragment inside a text document (incoming from a stream)?

The XML fragment is surrounded by plain text.

Example:

text...........
text...........
<?xml version="1.0" encoding="UTF-8 ?>
<Start>
...etc
</Start>
text...........
text...........

The XML is not represented by any class or object in the Namespace.

The XML can look different from time to time

1 9
0 96

Hello everybody,

I've been experimenting with Embedded Python and have been following the steps outlined in this documentation: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

I'm trying to convert a python dictionary into an objectscript array but there is an issue with the 'arrayref' function, that is not working as in the linked example.

This is a snapshoot of my IRIS terminal:

0 2
1 33

I downloaded IAM-3.4.2.0-5604.tar.gz from the Online Distribution site this morning, it the implementation to install it on our Development environment to see if it is a viable solution. Following the instructions, I have ran into an issue trying to make sure I am entering the information into the prompts correctly.

I have IRIS HealthShare Health Connect 2024.1 running locally using a Local Web Server, so when prompted I have entered the IP Address and port 443 is that correct?

0 8
0 66
Question
· Apr 11
Delete the reference MEMORY

So as asked, I am not talking about KILL - KILL as stated in the docs:


This command removes the variable. If there are no further references to the object, this command also removes the object from memory,

I want to remove the object from memory even if it is still referenced in memory - I understand that cache is not a low-level programming language, But i was hoping there is a way.

Notice that have a RegisteredObject and it is a single reference, It is different than the UnSwizzles suggested in other posts.

0 3
0 77

Hi,

I am using embeded python to utilize some pythonic library but i got a problem on my hand.

One of the python function i am using return multiple values

in python you would do something like that :

val1, val2, val3, = function(params)

In COS I got something like that :

lib = ##class(%SYS.Python).Import("lib")
val1 = lib.function(params)

And I don't know how to get the second and third values.
Is there a way to get them?

1 5
0 78

Hello,

I have my server setup a resource server. When a user calls our API they submit a bearer token as authorization and in our dispatch class AccessCheck() we validate the JWT using ##class(%SYS.OAuth2.Validation).ValidateJWT().

If I include a scope to check in that method I get the error Scope check may only be done on requesting client and I'm not sure what this means. The method works without include the scope and will let me know if I have an unsigned token or an expired token.

0 5
0 77

We are writing a custom Business Operation to interact with a downstream SOAP web-service. Classes for the SOAP operation were originally generated using the SOAP Wizard, then modified. This is functioning OK, but we'd now like to set the ReplyCodeActions setting on the operation and are struggling to make it visible via the management portal. How can we achieve this?

The classes are structured like this:

0 1
0 65

EnsLib.File.PassthroughOperation has File Name property with default value: %f_%Q%!+(_a)

The Management Portal documentation description of the property:

Name of file to output the document(s) to. May include timestamp specifiers. The %f specifier if present will be replaced with the name of the document's original source filename (stripped of characters illegal in target filenames).

See the method Ens.Util.File.CreateTimestamp() for documentation of timestamping options.

0 5
0 59

We have JSON type data in a Dynamic Object. Is there a simple way to export / dump that data to a delimited string or file?

e.g.

Results={"ClassA":{"ClassName":"ClassA","ACount":367191880,"BCount":367191880,"CurrentDiff":0,"PreviousDiff":0,"ReportDate":"2024-03-02 00:00:00"}
"ClassB":{"ClassName":"ClassB","ACount":5352149227,"BCount":5352149227,"CurrentDiff":0,"PreviousDiff":0,"ReportDate":"2024-03-02 00:00:00"}}

0 6
0 186

For example, I have two timestamp values ('2024-04-01 10:00:00', '2024-04-01 11:30:30'). I would like to find the difference between these two timestamps, and I need the result in hours:minutes:seconds (hh:mm:ss) format.

Expected Output: 01:30:30


Note: I need an SQL query command. I should not use ClassMethod, Function, or Stored Procedure.


Could anyone please provide me with an SQL query for my question?

0 4
0 77

During the realization of some required functionality, I discovered that I need to use Deflate compression, and found, that IRIS does not offer any options, $system.Util.Compress, works one way open (GZIP/COMPRESS) totally different, even for the same algorithms, I see that what I would expect as a result for Deflate somewhere there, but Compress returns something more. Is there any way to get a correct result using just ObjectScript without a need to use external tools? Was it really so difficult to have Deflate implemented in the first place?

0 7
0 120

When connectiong to IRIS from UBUNTU LTS 18.04, I got this error message:

ErrorException: odbc_connect(): SQL error: [unixODBC][Iris ODBC][State : S1000][Native Code 417]

[libirisodbcur6435.so]

Access Denied, SQL state S1000 in SQLConnect

I'm using "ODBC-2022.1.0.209.0-lnxubuntu1804x64.tar.gz" downloaded from

"https://github.com/intersystems-community/iris-driver-distribution/tree/..."

and folowing guide from

0 1
0 239

I built my rest api with ^%REST and update with CreateApplication.
Postman works fine and I suppose production server will work fine as UI and rest api will be on the same domain, but for now in dev, I need to have access from my local to the Iris rest api. I have a CORS error.

I do not know how to configure my swagger file to have either Parameter HandleCorsRequest=1 or <route Cors=true in the generated displ,cls.

0 3
0 61

Using VECTOR_COSINE() in SQL query to perform a text similarity search on existing embeddings in a %VECTOR column.

Code is below.

Commented out sql query returns this error: SQLCODE: -29 Field 'NEW_EMBEDDING_STR' not found in the applicable tables^ SELECT TOP ? maxID , activity , outcome FROMMain .AITest ORDER BY VECTOR_COSINE ( new_embedding_str ,

Sql query as written returns ERROR #5002: ObjectScript error: <PYTHON EXCEPTION> *<class 'OSError'>: isc_stdout_write: PyArg_ParseTuple failed!

0 10
0 126

Hello everyone,

I am working with InterSystems IRIS and seeking guidance on how to perform specific tasks related to the FHIR SQL Builder using commands or code, rather than the graphical user interface (GUI). The specific tasks I am trying to accomplish are:

1 4
1 119

I am exploring a way to make IRIS an immutable system where the production/operation IRIS is never changed. Changes are only made in Development, and then the "version" is copied to production/operation and stated.

For this to work, I will need data (objects) on a file share and the IRIS system on different systems. When the "new" version spins up, it will use the latest data.

I do not know if I can or how to separate "object data" from classes and code.

1 1
0 76

In cache studio there are features, dialog boxes, that help map data from a global to class properties.
I have used %CacheSQLStorage quit a bit, or have in the past, to map globals to classes.

I haven't been able to find a similar feature in VisualStudio.
Do I need to upgrade to IRIS to be able to use VisualStudio to map global properties to classes?

Thanks for your time,
Richard

1 2
0 71