Possible error csv2scidb when csv has 1 column


#1

This may be abuse of csv2scidb, but when I have a file with a single column of data:

scidb@ubuntu:~$ cat singleColumn.csv 
1
2
3
5
7

and I run csv2scidb on that file, the output appears to be missing closing parenthesis:

scidb@ubuntu:~$ csv2scidb < singleColumn.csv > singleColumn.scidb 
scidb@ubuntu:~$ cat singleColumn.scidb 
{0}[
(1,
(2,
(3,
(5,
(7
]

I believe there should be a a closing parenthesis between each number and the comma.


#2

Yes. This is a bug. I’ve put in a ticket and I’ll fix it.

But for now, when you use csv2scidb, you need to let us know what kind of parameters you’re looking for.


$ csv2scidb --help
Utility for conversion of CSV file to SciDB input text format
	Usage: csv2scidb [options] [ < input-file ] [ > output-file ]
	Options:
		-v version of utility
		-i PATH	input file
		-o PATH	output file
		-a PATH	appended output file
		-c INT	length of chunk
		-f INT	starting coordinate
		-n INT	number of instances
		-d char	delimiter - default ,
		-p STR	type pattern - N number, S string, s nullable-string, C char
		-q Quote the input line exactly, simply wrap it in ()
		-s N	skip N lines at the beginning of the file

By specifying what the column’s types are, you can get what you’re looking for:

$ cat /tmp/Data.txt 
1
2
3
4
5
$ csv2scidb -p N < /tmp/Data.txt 
{0}[
(1),
(2),
(3),
(4),
(5)
]

That should get you loading for now.


#3

Excellent, thank you for the work around.

Is the ticket system public, should I be search there for previous reports and/or submitting anything there?


#4

Sure.

trac.scidb.org/ticket/2134

We don’t (yet) have a public facility for submitting tickets.