#Data Import and Export

1 Follower · 121 Posts

This topic unites posts which describe approaches, tools, and solutions to import and export data into InterSystems IRIS and other InterSystems Data platform products: CSV, JSON, SQL, flat files, binary files, globals, streams, etc.

InterSystems staff + admins Hide everywhere
Hidden post for admin
Question Pietro Di Leo · Jul 4, 2025

Hello everybody, 

I would like to export project contents using Visual Studio Code, as well as I do with InterSystems Studio.

However, while attempting the export through the InterSystems extension I get the following error:

- There are no folders in the current workspace that code can be exported to.

These are the step to reproduce my error:

  1. Create and save a new VSCode workspace
  2. Open a local directory 
  3. Go to the InterSystems extension
  4. Open "Projects" panel and right-click on the project you want to export
  5. Click on "Export Project Contents"

Anyone can help me solving this issue?

11
3 395
Question Sylvain Guilbaud · Aug 23, 2023

Is it planned that LOAD DATA takes into account several DATE/DATETIME formats with, for example, a parameter indicating the format used in the source data?

example :

LOAD DATA .../...
USING
{
  "from": {
    "file": {
       "dateformat": "DD/MM/YYYY"
    }
  }
}
3
0 265
Question Chip Gore · Nov 18, 2022

In terms of general through-put design and long term support, I'm considering what would be a "best approach" for needing to create multiple batch files in a few different layouts from the same data-sets.

I need to iterate over a few very large tables to generate consistent batch outputs for different partner applications that need to be working on the same "version" of the source data.

0
1 535
Question Sam Duncan · Jul 12, 2023

It can sometimes be useful to list or export all of the subclasses that are derived, directly or indirectly, from a given class. In Studio, the Class -> Derived Classes menu option will show such a list, but I'm not aware of a built-in API for programmatically exporting their source code.

Yesterday I wrote some code for exporting derived classes, and I'm thinking about cleaning it up and putting it on Open Exchange. But if there's a simple way to do this that someone has already figured out, I'd be happy to know about that (and help others find that solution) rather than reinventing the wheel.

4
0 465
Question Stella Ticker · May 26, 2021

I am trying to populate a table using the sql Data Import Wizard. The input file is a tab delimited text file. But the import keeps failing with a 104 error showing validation for the columns which use %Library.TimeStamp and %Boolean datatypes is failing. Yet when I insert values into the table through a SQL insert command, the values get saved correctly in the table.

For the TimeStamp format in the wizard form, I am choosing YYYY-MM-DD-HH:MI:SS because  there was no option for this format: YYYY-MM-DD HH:MM:SS.

4
0 450
Question Lucas Galdino · Jan 6, 2024

Dear experts,

I'm trying exported a project from version '2012.5' to '2018.1.4' but is returning ERROR #7602.
Please, could you help me. How can I do it?
Below is steps that I did:



ACB>D $System.OBJ.Load("C:\GlobalPatch.xml")
 
Load started on 01/07/2024 00:06:51
Loading file C:\GlobalPatch.xml as xml
Imported global: ^GlobalPatch
Load finished successfully.
 
ACB>Set sc = ##class(%Studio.Project).InstallFromGbl("^GlobalPatch","fv")
ERROR #7602: Exported on version '2012.5' but this machine on version '2018.1.4' so unable to import

Thank you.

3
0 217
Question Vitaly Furman · Apr 5, 2022

Hello,

I am working on the new USCDI Requirement to store LOINC Codes/Descriptions for various types of Clinical Notes in the SDA.

According to all of the documentation I had been able to find, in order to store a coded value for Document Type, I have to use Custom Pairs:

#; Code System
        do ..write(cr_"<CustomPairs")
        do ..write(cr_"<NVPair>")
        do ..write(cr_"<Name>DocumentNameCodingStandard</Name>")
        do ..write(cr_"<Value>LN</Value>")
        do ..write(cr_"</NVPair>")
        #; Code
        do ..write(cr_"<NVPair>")
      

3
0 441
Question Edward Jalbert · Jan 4, 2021

I am hoping I explain this correctly.

We are using a query expire edge, to pass an API request to one of our vendor systems.

There is no feed into the gateway from an external system, and it is only used to query the external system with member data.

However, it is our understanding that the member needs to be registered on the edge.

Wondering if there is a way to export from the registry the bare demographic info in SDA to import to the new edge?

If anyone has done this and can point me to the right direction (documentation ect...) it would be greatly appreciated.

Thanks,

Ed

2
0 218
Question Mark Runyan · Jun 27, 2023

We are retiring a hosted application for an electronic health care records (EHR) system which stored the data on Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2017.2.2 (Build 867_4_20245) Thu Oct 8 2020 16:58:40 EDT.  The hosting company is providing me with a single CBK file.  I need to install a database system to restore the database and provide occasional SQL access for reports when necessary.  I'll need to maintain access to the data for an approximately 10 year retention period.

36
1 1329
Question Justin Richter · Jan 3, 2022

So I've been reviewing a lot of questions posted in the InterSystems community regarding NULL properties in JSON. I've also been reviewing the JSON documentation. None of these things have been able to help me so far.

1. We don't seem to have the %JSON.Adaptor class available for us to use in our system.

2. I'm not really confident enough to create JSON Type classes or backporting code, etc.

 

I created a dummy class and I need my JSON to look like this:
{
    "notanumber":"28001",
    "aboolean":true,
    "anumber":12345,
    "adecimal":1.

2
0 849
Question Philippe Ebinger · Oct 4, 2024

I have three different methods for exporting classes and projects as XML files, but each one produces slightly different output:

  1. Studio (what I currently use for exporting): I export as a project (with the 'only project' option disabled). This generates all classes and the project in a single XML file.
  2. VS Code: This method only exports the classes, and it doesn't include the project in the XML file.
  3. Console export using %SYSTEM.OBJ.Export: I used the following command to attempt the same export as Studio: do ##class(%SYSTEM.OBJ).Export("MyProject.Prj, MyProject.*.cls", "TempDir/MyProject.
1
0 182
Question Pietro Di Leo · Jan 17, 2024

Hi everyone, 

Does anyone know how to export projects via VSC? 

I opened the project through the "InterSystems Tools" plugin (command is "Edit Code in Project") and I can correctly work on it.

However, when I try using the "ObjectScript" plugin to export the project (right click on the project -> "Export Project Contents")

This message appears and it is not possible to export the project:

I've tried also to open a new window, then a folder and finally the project, but nothing changes. 

This is an example of my workspace: 


Anyone knows how to do it? 

Thank you! 

14
0 3412
Question Duc Anh Tran · Oct 4, 2018

Hello everyone,

i want to create an iris document database with Atelier with some properties, where i can import my JSON formatted data from an API to the database which i created. Right now i know how to import my local JSON formatted data to my created database:

Class User.Classtest

{

ClassMethod getFile() as %Status

{

 

               set filename = "/home/student/Downloads/own_scrobble.json"

               IF $SYSTEM.DocDB.Exists("db.Streamingdatabase") {

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

8
0 941
Question Limyandi Vicotrico · Jan 13, 2021

Hi Everyone,

 

I am trying the Export and Import application as per this link referred here: ExImData

 

I have the following sample class I am trying to import:


Class Persistent.PersonBackup Extends %Persistent
{ Property Name As %String; Storage Default
{
<Data name="PersonBackupDefaultData">
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>Name</Value>
</Value>
</Data>
<DataLocation>^Persistent.PersonBackupD</DataLocation>
<DefaultData>PersonBackupDefaultData</DefaultData>
<IdLocation>^Persistent.PersonBackupD</IdLocation>
<IndexLocation>^Persistent.

3
0 722
Question Scott Roth · Jan 6, 2022

We are migrating from AIX to Linux and part of our testing is trying to figure the best method to migrate the code. I am trying to export an entire Production, however I keep running into an error...

Error generating export list for production osuwmc.TestClin and all items may not be listed.
ERROR #5002: Cache error: <CLASS DOES NOT EXIST>zgetRecordandComplexMapClasses+34^Ens.Config.Production.1 *(No name)

I went through any Complex Record Maps, and recompiled them but I am still getting the same error

Does anyone know how I can track down this error and the culprit?

Thanks

Scott Roth

3
0 341
Question David Underhill · Jul 28, 2020

We use the %Net.FtpSession class to perform FTPS file transfers.  This has worked fine with Implcit FTPS servers but crashes when trying to connect to an Explicit FTPS server.  Explicit FTPS has a slightly diffferent negotiation in the intitial connection and different ports.

Has anyone gotten Explicit FTPS working with the Cache classes?

2
0 612
Question Stella Ticker · Mar 18, 2023

Is there a command that will loop through the flat files of a given Linux/Unix folder?  I can write the code to open and read each file. But the file names are unknown. I am looking for a way to access each file given a named Linux folder. The files have differing structures so a record map will not work.

Thank you for reading and thank you even more for answering!

1
0 503