#InterSystems IRIS

19 Followers · 5.5K Posts

InterSystems IRIS is a Complete Data Platform
InterSystems IRIS gives you everything you need to capture, share, understand, and act upon your organization’s most valuable asset – your data.
As a complete platform, InterSystems IRIS eliminates the need to integrate multiple development technologies. Applications require less code, fewer system resources, and less maintenance.

Question Niyaz Khafizov · Sep 20, 2018

Hi all.

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

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

And got this error:

Py4JJavaError: An error occurred while calling o80.save.
: java.lang.NoSuchMethodError: org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.schemaString(Lorg/apache/spark/sql/types




3
0 2151
Article Gevorg Arutiunian · Sep 13, 2018 1m read

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()

		While(result.Next()) 
		{
			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

6
0 841
Article Gevorg Arutiunian · Sep 20, 2018 2m read

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")
    // http://en.wikipedia.org/wiki/Determination_of_the_day_of_the_week
    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)

1
1 1165
Announcement Andreas Dieckow · Sep 18, 2018

Unconferences have been described as “networking on steroids.” They are the ultimate peer-to-peer discussion experience, and have been a vital part of InterSystems Global Summit for the past few years.

 

To ensure that this year's Unconference at Global Summit is better than ever, we want to know what YOU want to discuss with peers and industry leaders. Please follow the link below to submit your Unconference topic for 2018! Feel free to submit as many as you would like. Keep in mind that topics should be technology-related and relevant to conversations your peers will also be interested in. Top

3
1 408
Question Galena Teneva · Jul 5, 2018

Hi,
it is possible to convert a csv file to json file?

I want to stream json files and output the data as it comes in from the files. So my files are "csv" type and I want to convert these files to "json" type.


I can read csv file as follows:

ClassMethod ReadFile()
{
    set stream = ##class(%Stream.FileCharacter).%New()
    set sc = stream.LinkToFile("*.csv")
    do stream.Rewind()
    while'stream.AtEnd {
        set line=stream.ReadLine()
        write line,!
}
What should I add to convert it to "json" and read it again?

Thank you

7
1 1854
Article Yuri Marx · Sep 3, 2018 3m read

In the next ten years the applications will radically change, see my vision about it:

Today, the web apps are developed using modern HTML 5/CSS/Javascript frameworks like React, Angular, Bootstrap, etc. These web apps are focused on responsive views from the laptop to tablets and mobile screens.

In the early future, new forms to interacting with the user come true, especially cognitive conversations based on voice, bots and augmented reality and IoT/Wearable conversations deployed on smart watches, clothing, shoes, glasses, portable healthcare devices and home smarts things like Amazon Ale

5
1 1072
Question Carina Mueler · Sep 7, 2018

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:

curl.trillworks.com/#python

My code so far:
 

url = "http://127.0.0.1:52773/api/docdb/v1/NamespaceName/db/DBName"
url2 = "http://127.0.0.1:52773/api/docdb/v1/NamespaceName/doc/DBName/"


header = {
        'Content-Type': 'application/json',
    }
    response = requests.get(url, headers=header)
print(response.status





15
0 490
Article Gevorg Arutiunian · Sep 6, 2018 1m read

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 = "docs.intersystems.com"
		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

0
1 1071
Article Gevorg Arutiunian · Sep 4, 2018 11m read

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
2
2 1253
Article Yuri Marx · Sep 3, 2018 3m read

Companies today face serious problems in managing their data and delivering strategic value to them. The structure and business logic of data is fragmented into different solutions, architectures and technology platforms. In addition, different project teams, one for each solution, impose their views on the business, limiting the business to which each of these solutions are able to do. The database becomes a simple repository of processed data under the partial view delivered by each application, process, analysis, message and integration.

The value of the data for the company strategy is

4
1 1016
Announcement Steve Brunner · Jun 5, 2018

InterSystems is pleased to announce the release of InterSystems IRIS Data Platform 2018.1.1

This is our first follow up to InterSystems IRIS 2018.1.0, released earlier this year.  InterSystems IRIS is a unified data platform for building scalable multi-workload, multi-model data management applications with native interoperability and an open analytics platform.  As a reminder, you can learn more about InterSystems IRIS Data Platform from these Learning Services resources.

Hundreds of fixes have been made in this release:

  • Many changes that will greatly reduce future compatibility
12
0 918
Question Chris George · Jul 18, 2018

My understanding is that IRIS is a new technology and does not replace Cache or Ensemble and to that end is more of a modernization than a repackaging. Is that accurate?

Is IRIS and HealthShare heavily penetrated in the payer space of primarily dominate in the provider space? What is the trajectory for InterSystems to penetrate the payer landscape?

1
0 494
Announcement Evgeny Shvarov · Apr 11, 2018

Hi, Community!

Continuous Delivery is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time. It aims at building, testing, and releasing software faster and more frequently. The approach helps reduce the cost, time, and risk of delivering changes by allowing for more incremental updates to applications in production.

Join us at 07:00 UTC, April 24th for a webinar with a live demo "Git flows and Continuous Delivery" by @Eduard Lebedyuk 

The language of the webinar is Russian.

Also, see the related articles on DC.

1
0 568
Question Stefan Cronje · Aug 4, 2018

Hey folks,

I am new to IRIS and cloud platforms. I've done the InterSystems IRIS Experience on the learning site and read a lot of the online documentation. What I am unable to figure out is which type of package or option you will use on the cloud provider.

AWS for example, has AWS EC2, Elastic Beanstalk and some other products geared towards Docker containers.
Azure has Kubernetes and some other options.

Is IRIS and Docker deployed using the "Docker" products of the cloud providers, or should one get VM's on which CentOS is installed and Docker on top of that? Any advice, guidance or clari

5
0 713
Article Benjamin Thorne · Jul 24, 2018 1m read

The following code allows a user to view the audit settings of their instance. Run the code by running the class method "test":


class objectscript.checkAudit Extends %RegisteredObject
{
	classmethod test() {
		w "Checking for Auditing...",!
		Set SYSOBJ = ##class(Security.System).%OpenId("SYSTEM")
		If +SYSOBJ = 0 Set SYSOBJ = ##class(Security.System).%New()
		i SYSOBJ.AuditEnabled {
			w "Security Auditing is enabled for the following services",!
			s rs=##class(%ResultSet).%New("Security.Events:ListAllSystem")
			s sc=rs.Execute()  If $$$ISERR(sc) Do DisplayError^%apiOBJ(sc) Quit
			while r
1
1 770
Article Niyaz Khafizov · Jul 19, 2018 4m read

Hi all. Today we are going to use k-means algorithm on the Iris Dataset.

Note: I have done the following on Ubuntu 18.04, Apache Zeppelin 0.8.0, python 3.6.5.

Introduction

K-Means is one of the simplest unsupervised learning algorithms that solves the clustering problem. It groups all the objects in such a way that objects in the same group (group is a cluster) are more similar (in some sense) to each other than to those in other groups. For example, assume you have an image with a red ball on the green grass. K-Means will split all pixels into two clusters. The first cluster will contain t












0
3 9806
Question Tuan Minh Do · Jul 16, 2018

Hello,

I have imported my data with the following code (%DocDB).

set filename = "/home/student/Dokumente/convertcsv.json"

IF $SYSTEM.DocDB.Exists("Fitabase1") { 

SET db = ##class(%DocDB.Database).%GetDatabase("Fitabase1")

}

ELSE {

SET db = ##class(%DocDB.Database).%CreateDatabase("Fitabase1") 

}

set arr = ##class(%DynamicAbstractObject).%FromJSON(filename)

SET jstring = arr.%ToJSON()

//SET doccount = db.%Size()

DO db.%FromJSON(jstring) 

Now I have data sets like 

#     ID     %Doc                                                                                                                                 

2
0 498