0 Followers · 68 Posts

A comma-separated values (CSV) file is a delimited text file that uses a comma to separate values. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. The use of the comma as a field separator is the source of the name for this file format. A CSV file typically stores tabular data (numbers and text) in plain text, in which case each line will have the same number of fields.

Question Colin Brough · Oct 3

Is there any way of saving a representation of the results of a query created in the Message Viewer to a file - most obviously CSV.

We are reasonably adept at creating queries. We'd like to be able to send the output to a file, rather than resorting to cut'n'pasting from the message viewer window...

Is this possible? (on any version of Ensemble/Iris?)

Desired output to file something like:

ID,TimeCreated,Session,Status,Error,Source,Target,Body_MSH_MessageControlId,.....
1,8888888,2025-08-20 05:03:14.324,8438123,Completed,OK,ICE ADT Validator,ICE ADT TCP,1z123456,20220822......
0
0 129
Article Kate Lau · Oct 9 6m read

Hi,

It's me again😁, recently I am working on generating some fake patient data for testing purpose with the help of Chat-GPT by using Python. And, at the same time I would like to share my learning curve.😑

1st of all for building a custom REST api service is easy by extending the %CSP.REST

Creating a REST Service Manually

Let's Start !😂

1. Create a class datagen.restservice which extends  %CSP.REST 

Class datagen.restservice Extends%CSP.REST
{
Parameter CONTENTTYPE = "application/json";
}

 

2. Add a function genpatientcsv() to generate the patient data, and package it into csv string

0
0 0
Article Kurro Lopez · Sep 29 13m read

I am truly excited to continue my "InterSystems for Dummies" series of articles, and today, we want to tell you everything about one of the most powerful features we have for interoperability.

Hey, even if you have already had a go, we plan to take a really close look at how to get the most out of them and make our production even better.

0
0 0
Question Kurro Lopez · Sep 5

Hello community.

I have a request from a client who wants to do the following.
Currently, they have a data upload process via FTP in which they have implemented a RecordMap to store the information of the CSV files that are uploaded to the FTP directory.
Now they want to have another directory so that it is ONLY executed through an external instruction, not when the file is uploaded to the directory.

0
0 0
Article Evgeny Shvarov · Aug 27 3m read

Hi folks!

It is very easy to import CSV data into IRIS. But what if we want to preserve the original IDs in CSV?

Recently I came across with the situation when I needed to import two csv's into IRIS which were linked by one column referencing  to another csv's col: a typical Foreign Key and Primary Key situation, where csv1 contains this column as Primary Key, and csv2 as Foreign key with id's related to csv1.

The image is generated by ChatGPT so don't blame it - it tried its best to generate countries as primary keys with countries.csv-cities.csv relationship :)

0
0 0
Question David Saunders · Aug 12

I am trying to use upload.csp as a template for choosing a CDV file to process. I am calling it from a zen page using this:
<button caption="Import Client Consultation Extract" 
       controlStyle="width:500px; height:100px; font-size:1.5em;"
         onclick="zenPage.importExtract();"/>

ClientMethod importExtract() [ Language = javascript ]
{
    // Open CSP popup to upload the CSV
    //alert('importExtract called.');
    zenPage.launchPopupWindow(zenLink('Upload.CSP'),'Upload Client Consultation extract',
                              'status,scrollbars,resizable,width=750,height=250');
}

0
0 0
Article Raj Singh · Mar 27, 2024 2m read

In recent versions of IRIS, a powerful new data loading command has been introduced to SQL: LOAD DATA. This feature has been highly optimized to import data into IRIS extremely fast, allowing hundreds of gigabytes of data to be inserted in seconds instead of hours or days. 

This is a very exciting improvement. However, a big problem in the data loading experience still exists. Namely, the time and hassle it takes to:

  1. Define the schema for the table in which you want to load data.
  2. Figure out the syntax for the LOAD DATA command.
0
0 892
Article wisitsak sangiamsak · Jul 31 1m read

Here's a practical example of how to import data from a CSV file into InterSystems CACHÉ using ObjectScript
Assuming your CSV file is simple (e.g., comma-separated, with headers), you can use %Stream.FileCharacter to read it line by line and parse the data.
 

ClassMethod ImportCSV(filePath As %String) As %Status {
    Set stream = ##class(%Stream.FileCharacter).%New()
    Set sc = stream.LinkToFile(filePath)
    If 'sc Quit sc

0
0 0
Article Muhammad Waseem · May 28 4m read


Hi Community,
In this article, I will introduce my application iris-fhir-bridge 
IRIS-FHIR-Bridge is a robust interoperability engine built on InterSystems IRIS for Health, designed to transform healthcare data across multiple formats into FHIR and vice versa. It leverages the InterSystems FHIR Object Model (HS.FHIRModel.R4.*) to enable smooth data standardization and exchange across modern and legacy healthcare systems.

0
0 0
Question Dmitrij Vladimirov · Feb 10

For example we have a docker app that receives a .csv file from windows environment and then do some processing on it in docker linux environment.
 
Windows encode new line in CRLF format, but linux can understand only LF and throw an unexpected errors like
 

ERROR #7207: Datatype value '100 ' is not a valid number > ERROR #5802: Datatype validation failed on property 'esh.i14y.csv.CelciusCSV.Record:Temperature', with value equal to "100 "


Is there a way to convert new line logic inside iris container in cases when .csv file (and other possible files) comes from windows environment ?

0
0 0
Article Alberto Fuentes · Jan 29, 2024 12m read

We have a yummy dataset with recipes written by multiple Reddit users, however most of the information is free text as the title or description of a post. Let's find out how we can very easily load the dataset, extract some features and analyze it using features from OpenAI large language model within Embedded Python and the Langchain framework.

Loading the dataset

First things first, we need to load the dataset or can we just connect to it?

2
2 381
Question Carl (booz Allen) Deitrich · Mar 5, 2024

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
0 408
Article Anton Umnikov · Dec 4, 2020 7m read

IRIS External Table is an InterSystems Community Open Source Project, that allows you to use files, stored in the local file system and cloud object storage such as AWS S3 as SQL Tables. IRIS External Table

It can be found on Github https://github.com/intersystems-community/IRIS-ExternalTable Open Exchange https://openexchange.intersystems.com/package/IRIS-External-Table and is included in InterSystems Package Manager ZPM.

To instal External Table from GitHub use:

4
2 1248
Question isabella Barnes · Nov 16, 2023

Can someone share some details for creating a  pipeline for converting CCDA (XML) document into Flatfile or CSV File using IRIS.

@Marc Mundt 
@David.M 
@Paul Lomayesva

Could you please help me out identifying the inbound and outbound adapters along with the DTL process for converting CCDA into CSV Files.


Thanks in  advance!!
Isabella

3
0 457
Article Luis Angel Pérez Ramos · Sep 27, 2023 6m read

Recently @Anastasia Dyubaylo published a post (this one) showing a new IntegratedML functionality for time series predictions that @Thomas Dyar already presented to us at the Global Summit 2023 so, let's go to set up a small workshop to test it!

Introduction

For this workshop we have chosen as the topic the prediction of monthly users of the Valencia Metro line by line. To do this, we have monthly data broken down by lines since 2022 as well as annual data by lines since 2017 that we will extrapolate monthly.

1
2 446
Article Evgeny Shvarov · May 16, 2023 1m read

Hi folks!

Just want to introduce you a new util to import CSV into IRIS - csvgenpy!

Install

USER>zpm "install csvgenpy"

Use:

do ##class(shvarov.csvgenpy.csv).Generate("file or url","table","schema")

Example:

USER>do ##class(shvarov.csvgenpy.csv).Generate("https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv","titanic","data")

This will create table and class data.titanic in IRIS and will load the data.  you can proof it with:

0
1 278
Article Muhammad Waseem · Apr 17, 2023 4m read

Hi Community,
In this article, I will introduce my application iris-mlm-explainer

This web application connects to InterSystems Cloud SQL to create, train, validate, and predict ML models, make Predictions and display a dashboard of all the trained models with an explanation of the workings of a fitted machine learning model. The dashboard provides interactive plots on model performance, feature importances, feature contributions to individual predictions, partial dependence plots, SHAP (interaction) values, visualization of individual decision trees, etc.

Prerequisites

6
1 405
Question Evgeny Shvarov · Jan 15, 2023

Hi folks!

Have a question for those who are masters of interoperability.

I have a basic task of having one CSV with some data. I need to transform one column in the initial dataset and get the new csv with the same form.

What's the best approach with Interoperability?

Should I user record mapper?

Should I use streams, objects?

What is the best practice?

12
0 687
Article Andreas Schneider · Jan 2, 2022 3m read

The last days I've work with the great new feature: LOAD DATA With this post I would like to share my first experiences with you. The following points do not contain any order or other evaluation. These are only things that I noticed when using the LOAD DATA command. It should also be noted that these points are based on the IRIS Version 2021.2.0.617 which is a preview release. So it may be that my observations do not apply to newer IRIS versions. But maybe they are helpful for others.

1) The file path is on server side

5
2 1141
Article Lucas Enard · Aug 17, 2022 8m read

In this GitHub we gather information from a csv, use a DataTransformation to make it into a FHIR object and then, save that information to a FHIR server all that using only Python.

The objective is to show how easy it is to manipulate data into the output we want, here a FHIR Bundle, in the IRIS full Python framework.

1. Fhir-orga-dt

3
0 575
Article Evgeny Shvarov · May 30, 2020 2m read

Hi Developers!

Sometimes we need to import CSV data programmatically to InterSystems IRIS either from CSV or from URL. And we expect the class with proper datatypes to be created and the data to be imported.

I published a module csvgen on Open Exchange which does exactly that.

If you just need the CSV file be imported into IRIS you can do the following:

16
1 1427
Article Evgeny Shvarov · Sep 20, 2021 3m read

Hi folks!

Sometimes we need to import data into InterSystems IRIS from CSV. It can be done e.g. via csvgen tool that generates a class and imports all the data into it.

But what if you already have your own class and want to import data from CSV into your existing table?

There are numerous ways to do that but you can use csvgen (or csvgen-ui) again! I prepared and and example and happy to share. Here we go!

2
0 1160