Loading csv file probelm


#1

I have a csv file with the following schema

there are 128 column values per row (fixed), and there are for example only five rows. i.e.
------- col1 | col2 | col3 … col128
row1
row2
.
.
row5

so I created an array with a single attribute and two dimensions in scidb --> val:double [i=0:4,5,0, j=0:127,128,0]

When I try to load my csv file into the array using the LOAD operator in scidb, I get the following error:

UserException in file: src/query/ops/input/InputArray.cpp function: moveNext line: 371
Error id: scidb::SCIDB_SE_IMPORT_ERROR::SCIDB_LE_FILE_IMPORT_FAILED
Error description: Import error. Import from file ‘/home/scidb_data2.csv’ (instance 0) to array ‘db’ failed at line 0, column 11, offset 11, value=’’: Input parser expected ‘[’.

I used the instructions listed on this documentation link:
http://paradigm4.com/HTMLmanual/13.3/scidb_ug/ch05s02s03.html

I’ve also tried loading it using the accelerated input tools, but it also hasn’t worked, and a received a different error on my console. I used the following code:

./iquery -aq “store(redimension(
between(
apply(
aio_input(
‘/home/scidb_data2.csv’,
‘attribute_delimiter=,’, ‘num_attributes=1’, ‘split_on_dimension=1’),
d, tuple_no,
f, attribute_no,
val, double(a)),
0,0,0,0,
127,0,0,3),
<val:double null>[d=0:127,128,0, f=0:3,4,0]),
facesdb)”;

UserException in file: src/query/BuiltInFunctions.inc function: CONV_TID_DOUBLE_FROM_String line: 394
Error id: scidb::SCIDB_SE_TYPESYSTEM::SCIDB_LE_FAILED_PARSE_STRING
Error description: Typesystem error. Failed to parse string 'long,0.004109714,-0.054901689,-0.049006402,0.035313837,-0.0174811,0.040030487,-0.110346437,-0.05520808,0.008749958,0.074242592,-0.093610846,0.109369323,0.226723418,0.049988002,0.07145337,0.157696307,0.126843289,0.015056946,-0.078004368,0.147747561,0.088425651,-0.048019994,-0.114015743,0.001413138,0.032931365,-0.118013188,0.001607283,0.077436745,0.19202432,-0.009012149,0.055945128,0.004387818,-0.110869527,0.15125224,0.028274704,-0.04665919,0.070206925,0.106309131,-0.076021455,-0.191630855,0.210394979,-0.007918888,0.108619407,0.037980851,0.073229559,-0.029861376,-0.009322268,-0.036857326,-0.225779504,-0.008915481,-0.015560572,-0.002686795,-0.041902401,-0.093862966,0.032220185,-0.060666159,0.134225503,0.003343724,0.023696827,0.041741889,-0.046773396,0.057638824,0.031793218,0.070901126,-0.019534335,-0.025159182,0.105246447,0.024795769,-0.049539287,0.1837686,-0.05248408,0.044094186,-0.253588825,-0.222292975,0.00231343,-0.072752044,-0.13853091,-0.038736496,-0.061895378,0.106419213,0.054279625,-0.107926831,-0.063320585,-0.033078715,-0.084634379,-0.030089693,-0.156724125,-0.031476595,0.007267636,-0.031506926,-0.037970126,-0.07577946,0.005991677,0.059785224,0.004382816,-0.009851946,0.026057063,-0.056841012,0.110782281,0.025092406,0.123455063,0.053776395,-0.064384878,-0.142938778,0.023132745,0.031073507,-0.080278046,0.139814019,-0.028693162,0.033348173,-0.177128047,-0.132891774,0.03673885,0.061426114,0.067791,-0.07134898,-0.033751234,-0.115187533,-0.104277857,-0.074941754,-0.055891853,0.002527931,0.018423084,0.084461108,-0.015699213,0.022865532,-0.04375203

I’ve attached a shot of what my csv file looks like, but i’m pretty sure the problem doesn’t lie there though.

Can you please offer any assistance?


#2

Hi, I think your use case matches this post very well. Take a look:
http://rvernica.github.io/2016/08/load-data-table


#3

This was beyond helpful, thank you so much for the link.