Guillaume Rongier · Nov 18, 2022 go to post

I use it time to time.

But for now, I still prefer to use VsCode on my desktop + Docker.

Let see, if the time change my habits.

Guillaume Rongier · Oct 21, 2022 go to post

Because underneath embedded python is using CallIn Service of IRIS.

And by default this service is off.

Guillaume Rongier · Oct 21, 2022 go to post

Hi,

You need to fill in some environment variables that allow you to authenticate yourself and therefore connect.

The variables are :

IRISUSERNAME
IRISPASSWORD
IRISNAMESPACE

In a docker file for example :

# environment variables for embedded python
ENV IRISUSERNAME "SuperUser"
ENV IRISPASSWORD "SYS"
ENV IRISNAMESPACE "IRISAPP"

In a shell :

export IRISUSERNAME=SuperUser
export IRISPASSWORD=SYS
export IRISNAMESPACE=IRISAPP
Guillaume Rongier · Oct 18, 2022 go to post

Yes, the flask app run on 8080 and map on docker compose to 4040.

I update the github to make flask run on 5000 and map to 5000.

Guillaume Rongier · Oct 9, 2022 go to post

For debugging embedded python, i do not use ObjectScript wrapper.

Use "pure" python, with the VsCode and the irispython interpreter, after use the debugger like any normal python program/script :

image

Guillaume Rongier · Oct 9, 2022 go to post

query is the way to go :

import iris

g = iris.gref("^MyGlobal")

# Insert some data
g[1] = "my first line"
g[2] = "my second line"
g[1,"a"] = "my first line with a key"
g[1,"b"] = "my first line with a key"
g[2,"a"] = "my second line with a key"
g[2,"b"] = "my second line with a key"
g[3,"a",1] = "my third line with a key and a subkey"

for (key, value) in g.query():
    print(f"{key} -> {value}")

result :

['1'] -> my first line
['1', 'a'] -> my first line with a key
['1', 'b'] -> my first line with a key
['2'] -> my second line
['2', 'a'] -> my second line with a key
['2', 'b'] -> my second line with a key
['3'] -> None
['3', 'a'] -> None
['3', 'a', '1'] -> my third line with a key and a subkey
Guillaume Rongier · Oct 3, 2022 go to post

I'm personally, trying to help with these issues. Even for ObjectScript, I managed to upgrade the developer's experience with modern IDE VSCode (So, the young developers who know what a modern development process should look like, would not be so shocked by so outdated Studio). Help with using Docker in the development process, package managers, and continuous integration, all with ObjectScript, and even static syntax analyzer. But I want that all the new projects would not use ObjectScript at all, to help with it, I have built Django driver to IRIS. I want to see IRIS support in as many programming languages as possible, and as many libraries and frameworks as possible. So, the developers would not have any issues in switching jobs, they have to use their knowledge which could be applicable anywhere. Want to build an application that uses SQL, that's ok, here is the driver, connect it and use it, as you would do it with another relational database.  NoSQL, ORM, or something else, is not an issue as well. But it's still too far to this point.  

I am so aligned with what you are saying.
IRIS is a database first (and with lots of assets : MultiModel, Speed, Analytics, Transactional, Sharding and so on).
The code when possible should be next to the database, not in the database. And we need to make the use of IRIS simple and elegant on other frameworks.
Your work on n8n, node red, VsCode, django are important for the community.
Thanks again for all these contributions and keep going you are in the right direction!

Guillaume Rongier · Sep 30, 2022 go to post

Hi André,

I have the same impression in France, we also have difficulties to find people who know the ObjectScript language.


To answer this problem, there is the Embedded Python solution which is almost 100% compatible with ObjectScript.
From my point of view, this is one of the answers to this problem.


Moreover, if like us in France, many projects are done with IRIS Interopreabilty (a.k.a Ensemble), I can advise you to use this ZPM module which offers a 100% Python experience and a strong compatibility with all existing projects.


This way, newcomers to InterSystems technologies can quickly get up to speed while ensuring a smooth transition between the "old guard" and the new generation.

Guillaume Rongier · Sep 29, 2022 go to post

Impressive, thanks so much sharing that with us.

Few questions come to my mind :

  • There is no example for IRIS in you github do you plan to do it ?
  • Are you using behind the scene the NativeAPI from IRIS ?
    • If answer is true, are you using the Calling ObjectScript Methods and Functions ?
    • Else, why not ?
Guillaume Rongier · Sep 26, 2022 go to post

I have partially found a solution:

First I create an SQL function with python code :

CREATE FUNCTION sqliknowparser(tText VARCHAR(50000))
    RETURNS VARCHAR(50000)
    LANGUAGE PYTHON
{
    import iknowpy

    engine = iknowpy.iKnowEngine()

    # index some text
    text = tText
    engine.index(text, 'en')

    t_output = ""

    # or make it a little nicer
    for s in engine.m_index['sentences']:
        for e in s['entities']:
            if e['type'] == 'Concept':
                t_output = t_output  + e['index']+ "|"

    return t_output[:-1]
}

Then I use this function in my query :

SELECT 
ID, sqliknowparser(Text) as entities
FROM AA.Goal 

Then I "piece" it an use a union query :

SELECT 
ID, $piece(sqliknowparser(Text),'|',1) as entities
FROM AA.Goal 
union
SELECT 
ID, $piece(sqliknowparser(Text),'|',2) as entities
FROM AA.Goal 

Any improvement are welcome :)

Guillaume Rongier · Sep 23, 2022 go to post

Is it possible to do the same thing only in SQL and Python?

CREATE PROCEDURE procname(parameter_list)
    [ characteristics ]
    LANGUAGE PYTHON
   { code_body }
Guillaume Rongier · Sep 21, 2022 go to post

Thanks Robert for the PullRequest and making sure of the quality of the demos/articles.

Sometimes it's hard do build and test at the same time, this is why in medium to large projects the development teams are different from the testers.

Thanks again :)

Guillaume Rongier · Sep 16, 2022 go to post

Great initiative !

I love this approach, building plug-ins for third-party software to facilitate integration with IRIS.

You have done it too for node red ?

Next one, i vote for make.com

Guillaume Rongier · Aug 19, 2022 go to post

What I like with this demo is the auto-completion of FHIR resources thanks to the "fhir.resources" library in python.

Is it also possible to do validation with this library?

Guillaume Rongier · Aug 19, 2022 go to post

Great article, in fact, with Fine Tuning, we can use pre-built and famous models like BERT (text classification by google) and adapt them to our need.

Moreover, in this case, we are not in theory but in a practical case of classification of more or less positive comments.

Thanks for this contribution!

Guillaume Rongier · Jul 28, 2022 go to post

I love this project.

What I love the most is that is a full fix experience with an acceptor server and an initiator client (iris).

Some screenshot of a quote + an order :

The order : image

The quote before the order : image

The result of the quote : image

The order with the quote id : image

The result of the order : image

Result of a market request : image

Guillaume Rongier · Jul 27, 2022 go to post

You are right there still is some issue in the IRIS DB-API, they will be fix in future release.

Guillaume Rongier · Jul 11, 2022 go to post

@Dmitry Maslennikov

I join you in all these considerations:

  •  No lastest tag or 2021.1 sub-tag
    •  Corollary: Deleting versions without warning
  •  ARM64 images have separate names
  •  Health check behavior a bit weird
  •  Weak documentation of flags

For all these reasons I use the community versions for building my demos (thanks @Evgeny Shvarov).

However, for the problem of disappearing versions what we did with some customers is to copy the images in a private repository, it is not the most elegant solution but it works.

Guillaume Rongier · Jun 9, 2022 go to post

Hi Paul,

You can log with SuperUser/SYS.

The last version of main should fix your issue.

I still have to fix, CDA to FHIR but others are working.

Guillaume Rongier · May 16, 2022 go to post

Hi, BTW, starting with IRIS 2021.1+ you can enable the interoperability metrics with those command lines :

// Enable Intero metrics for SAM
zw ##class(Ens.Util.Statistics).EnableSAMForNamespace()
zw ##class(Ens.Util.Statistics).EnableSAMIncludeHostLabel()