AFL insert array_literal


#1

Hi, I am trying to insert array_literal, e.g. 3 x 3 interger matrix, ‘[[(2)(3)(0)][(0)(55)(0)][(7)(0)(0)]]’ into SciDB through shim. However, it seems that AFL’s insert command does not support array_literal insertion. I tried AQL with insert INTO according to (scidb.org/HTMLmanual/13.12/scidb_ug/ch09s01.html) and it works. So, I want to know if with AFL, the array_literal can be used to populate a SciDB array or if an array can be created with all the values in it?


#2

Hi Rencailhc:

How do you use AQL with shim? Do you use wget or are you using a python interface, such as Scidb-py?

Sorry, I dont have an answer for your question.

F.


#3

Hi,

In the way to do this in AFL is to use build, passing the literal string as the second argument and the hidden “true” flag as the third argument. Like this:

$ iquery -aq "create array foo <val:double> [x=1:10000,1000,0, y=1:10000,1000,0]"
Query was executed successfully

$ iquery -aq "build(foo, '{1,1}[[{12,135}(3.14159)]]', true)"
{x,y} val
{12,135} 3.14159

$ iquery -aq "insert(build(foo, '{1,1}[[{12,135}(3.14159)]]', true), foo)"
{x,y} val
{12,135} 3.14159