Continuing on with providing some examples of various storage technologies and their performance profiles, this time we looked at the growing trend of leveraging internal commodity-based server storage, specifically the new HPE Cloudline 3150 Gen10 AMD processor-based single socket servers with two 3.2TB Samsung PM1725a NVMe drives.

4 2
0 1.2K

Google Cloud Platform (GCP) provides a feature rich environment for Infrastructure-as-a-Service (IaaS) as a cloud offering fully capable of supporting all of InterSystems products including the latest InterSystems IRIS Data Platform. Care must be taken, as with any platform or deployment model, to ensure all aspects of an environment are considered such as performance, availability, operations, and management procedures. Specifics of each of those areas will be covered in this article.

6 0
2 3.6K
· Sep 27, 2018 2m read
Method to Create a Class

The following class method "test" contains code that can create a new class, create new properties for classes, or create new methods for classes. "test" runs all three of these processes once, and the code that performs each action is labelled by comments in the method:

ClassMethod test() As %Status
    set sc = $$$OK
    // Create a class
    set class = ##class(%ClassDefinition).%New("MyClass")
    set class.Description = "This is my test class"_$c(13,10)_"testing %ClassDefinition"
    set class.Super = "%Persistent"

    // Create a property and add it
    set property = ##class(%PropertyDefinition).%New("MyClass.MyProperty")
    set property.Type = "%String"
    set property.Description="This is a property"
    set sc1 = class.Properties.Insert(property)
    do:$$$ISERR(sc1) $system.Status.DisplayError(sc1)
    set sc = $$$ADDSC(sc, sc1)
    // Create a method and add it
    set method = ##class(%MethodDefinition).%New("MyClass.MyMethod")
    set method.ReturnType = "%Integer"
    set method.FormalSpec = "x:%Integer,y:%Integer=10"
    set method.Description = "Return product of x and y"
    set method.CodeMode = "code"
    set method.Code = " new result"_$c(13,10)_" set result=x*y"_$c(13,10)_" quit result"
    set sc2 = class.Methods.Insert(method)
    do:$$$ISERR(sc2) $system.Status.DisplayError(sc2)
    set sc = $$$ADDSC(sc, sc2)
    // Save the class definition
    set sc3 = class.%Save()
    do:$$$ISERR(sc3) $system.Status.DisplayError(sc3)
    set sc = $$$ADDSC(sc, sc3)
    return sc

Here's a link to the code on GitHub

1 1
0 515

I followed the First Look instructions and tried to run a Docker container with the below command:

> docker run --name iris --detach --publish 52773:52773 --volume /Users/docker:/external --env ICM_SENTINEL_DIR=/external iris:latest --key /external/iris.key --before "/usr/irissys/dev/Cloud/ICM/ /external/password.txt"

It returned with a container ID and an error message:

0 4
0 1.4K

Hi all.

I want to insert my dataframe into InterSystems IRIS. So, I tried to do this:

df ="/home/imported-openssh-key/zeppelin-0.8.0-bin-all/bin/resultData3/DF.json", format="json")
option("url", "IRIS://localhost:51773/DEDUPL").\
option("user", "********").option("password", "********").\
option("dbtable", "try.test1").save()

And got this error:

1 3
0 1.8K
· Sep 13, 2018 1m read
Find a table given its name

The following code snippet includes a class method "test" that runs code to find a class based on the class's name. "test" takes one argument, which is the name of the table:

Class objectscript.findTable Extends %RegisteredObject
    classmethod test(name as %String="mytable")  
            #Dim result as %ResultSet
            #Dim tName as %String
            #Dim contain as %Integer
            Set contain=0
            Set result = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:Summary")
            Do result.Execute()

                Set tName=$get(result.Data("Name"))
                &sql(select position (:name in :tName) into :contain)
                Write:contain'=0 tName, " ... ", name, " (", contain,")", !
            Return $$$OK

Here's a link to the code on GitHub

2 6
0 683
· Sep 20, 2018 2m read
Get Day of the Week from Date

This code snippet determines the day of the week associated with a date. The class method "test" takes a date as a string in "mm/dd/yyyy" format, and returns an integer corresponding to a day of the week:

Class cartertiernan.getDayfromDate Extends %RegisteredObject
    classmethod test(date) as %Integer {
        //Set date = $ZDATE(date) //  Looks like: mm/dd/yyyy
        Set monthList = $LISTBUILD(0,3,3,6,1,4,6,2,5,0,3,5) // (Jan,Feb,Mar,Apr,...)
        Set centuryList = $LISTBUILD(6,4,2,0) // first two digits divisiable by 4, then subsequent centuries. EX (2000, 2100, 2200, 2300)
        Set dayList = $LISTBUILD("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday") // Index goes from 0-6
        Set day = $PIECE(date,"/",2) // get the day 
        Set monthVal = $LIST(monthList,($PIECE( date,"/",1 ))) // get the month value
        Set first2DigsYear = $PIECE( date,"/",3 ) \ 100 // get the last 2 digits of the year
        Set last2DigsYear = $PIECE( date,"/",3 ) # 100 // get the first 2 digits of the year
        // Used for DEBUG perpouses
        /*write !,"day: ",day
        write !,"Month: ",monthVal
        write !,"last2: ",last2DigsYear
        write !,"first2: ",first2DigsYear
        write !,"cen Val: ",$LIST(centuryList,(first2DigsYear # 4) + 1),!!*/
        // Look here for formula explination (its the "Basic method for mental calculation")
        Set dayOfWeekVal = ( day + monthVal + last2DigsYear + (last2DigsYear\4) + $LIST(centuryList,(first2DigsYear # 4) + 1 ) ) # 7
        Quit dayOfWeekVal

Here's a link to the code on GitHub

(originally posted to CODE by Carter Tiernan, 6/18/14)

2 1
0 792

Hey guys,
I need your help.

I am writing a code in Python and I want to create a database and some properties and then to send json files (data) to this database. (I use client-server-model for loading the data into IRIS)

I use curl methods and convert it in Python code with:

My code so far:

0 15
0 361

In this series of articles, I'd like to present and discuss several possible approaches toward software development with InterSystems technologies and GitLab. I will cover such topics as:

  • Git 101
  • Git flow (development process)
  • GitLab installation
  • GitLab Workflow
  • Continuous Delivery
  • GitLab installation and configuration
  • GitLab CI/CD
  • Why containers?
  • Containers infrastructure
  • CD using containers
  • CD using ICM
  • Container architecture

In this article, we would talk about building your own container and deploying it.

3 13
2 1K
· Sep 6, 2018 1m read
Save a file using %Net.HttpRequest

This code snippet allows for a file on the web to be saved into the file system. Specify the server and GET request, as well as the directory the file should be saved to. The class method "test" runs the code:

Class objectscript.saveFileHTTP Extends %RegisteredObject
    classmethod test() {
        Set httprequest = ##class(%Net.HttpRequest).%New()
        Set httprequest.Server = ""
        Do httprequest.Get("documentation/cache/20172/pdfs/GJSON.pdf")
        Do $System.OBJ.Dump(httprequest.HttpResponse)
        Set stream=##class(%FileBinaryStream).%New()
        Set stream.Filename="c:\test.pdf"

        Write stream.CopyFrom(httprequest.HttpResponse.Data)
        Write stream.%Save()

Here's a link to the code on GitHub

3 0
1 846

I already talked about GraphQL and the ways of using it in this article. Now I am going to tell you about the tasks I was facing and the results that I managed to achieve in the process of implementing GraphQL for InterSystems platforms.

What this article is about

  • Generation of an AST for a GraphQL request and its validation
  • Generation of documentation
  • Generation of a response in the JSON format
6 2
2 970