evshvarov / csvgen

module to generate and import csv data using InterSystems ObjectScript
MIT License
6 stars 5 forks source link

Not working on Ubuntu #17

Closed isc-rsingh closed 9 months ago

isc-rsingh commented 2 years ago

I have a problem importing the Titanic data set on Ubuntu

set st =  ##class(community.csvgen).GenerateFromURL("https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv",",","Data.Titanic")
w $System.OBJ.DisplayError(st)

returns

ERROR #5475: Error compiling routine: %sqlcq.pSYS.cls19.  Errors:  %sqlcq.pSYS.cls19.cls

 Host variable name must begin with either % or a letter, not '{'^LOAD DATA FROM FILE '/home/yguan/InterSystems/IRISTEST/mgr/Temp/stream20220606' COLUMNS(PassengerId INTEGER,Survived INTEGER,Pclass INTEGER,Name VARCHAR(250),Sex VARCHAR(250),Age INTEGER,SibSp INTEGER,Parch INTEGER,Ticket VARCHAR(250),Fare MONEY,Cabin VARCHAR(250),Embarked VARCHAR(250)) INTO Data.Titanic USING {"from":1
evshvarov commented 9 months ago

Tried on Docker (which is Ubuntu?) - works:

set st =  ##class(community.csvgen).GenerateFromURL("https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv",",","Data.Titanic")
w $System.OBJ.DisplayError(st)
Class name: Data.Titanic
Header: PassengerId INTEGER,Survived INTEGER,Pclass INTEGER,Name VARCHAR(250),Sex VARCHAR(250),Age INTEGER,SibSp INTEGER,Parch INTEGER,Ticket VARCHAR(250),Fare MONEY,Cabin VARCHAR(250),Embarked VARCHAR(250)
Records imported: 891
USER>w $System.OBJ.DisplayError(st)
1

IRIS version - IRIS for UNIX (Ubuntu Server LTS for ARM64 Containers) 2024.1.0L (Build 207U) Thu Jan 11 2024 01:49:00 EST