load data file to an array with float dimensions

Get help using the SciDB system, discuss existing features, report bugs and problems.

load data file to an array with float dimensions

Postby rcosta » Thu May 24, 2012 10:25 am

I'm having difficulties to format the load file to load into an array with a float dimension index.
I tried a several format input, but anything work.

Code: Select all
AQL% create empty array float_dim <val1:double, val2:double> [x(float)=3,3,0, y(float)=3,3,0];
Query was executed successfully
AQL% set lang afl;
AFL% load(float_dim, '/tmp/data.out');
UserException in file: src/query/ops/input/InputArray.cpp function: end line: 49
Error id: scidb::SCIDB_SE_IMPORT_ERROR::SCIDB_LE_FILE_IMPORT_FAILED
Error description: Import error. Import from file '/tmp/data.out' (instance 0) to array 'float_dim' failed at line 2, column 6, offset 9, value='1.5': Failed to parse string.
Failed query id: 1100849845945


This /tmp/data.out is not loaded:
Code: Select all
[[
{0,1.5}(1,2)
]];


But, when I use integer in /tmp/data.out is loading ok. Like this:
Code: Select all
[[
{0,1}(1,2)
]];


In the SciDB User Guide (page 29) is shown about string format, but don't have load format.
In the page 1, have the only one reference about float dimensions in the guide. Follows the sentence:
Basic array dimensions are 64-bit integers. SciDB also supports arrays with one or more noninteger dimensions, such as variable-length strings (alpha, beta, gamma, ...) or floating-point values (1.2, 2.76,4.3, ...).

In the page 30 have a note:
In the current version of SciDB, it is not possible to load data directly from an external file into a mapping array.

How is the alternative loading data to an array with float dimensions, without the directly load?

Thank you very much for your reply.
rcosta
 
Posts: 10
Joined: Wed Feb 08, 2012 12:07 pm
Location: Petrópolis, Rio - Brazil

Re: load data file to an array with float dimensions

Postby apoliakov » Thu May 24, 2012 1:29 pm

True,

When you need to load into non-integer dimensions, currently you have to use the redimension_store operator. So, first load into integer dimensions, then redimension_store a copy.
apoliakov
Site Admin
 
Posts: 243
Joined: Wed Nov 03, 2010 2:46 pm


Return to SciDB Support and Discussion

Who is online

Users browsing this forum: No registered users and 1 guest