Request a Scidb AQL and AFL command shell terminal


Great ideas about a database management system of huge arrays.

I read the install guide, and found that the only user interface available right now is iquery. Is a user interface like a command shell for AQL and AFL planned?



Yes. Upcoming release has improved iquery with shell-like interface. It still pretty simple, but some readline handy features like history, history-search and some iquery’s helper commands implemented. I think in the future iquery will be more powerful.


Slightly confused …

iquery is a command line tool. I’ll slip up a bit, and talk about the upcoming version in this reply. But here’s what it looks like.

plumber@plumber-desktop:~$ iquery -h
Usage: iquery [OPTIONS] 
Available options::
  -c [ --connection ] arg Host of one of the cluster nodes. Default is 
  -p [ --port ] arg       Port for connection. Default is 1239.
  -q [ --query ] arg      Query to be executed. Default is ''.
  -f [ --query-file ] arg File with query to be executed.
  -a [ --afl ]            Input query is AFL. AQL by default.
  -v [ --verbose ]        Print debug info. Default is disabled.
  -r [ --result ] arg     Filename with result array data. Default is 
  -n [ --no-fetch ]       Skip data fetching.
  -o [ --format ] arg     Output format: auto, csv, csv+, sparse. Default is 
  -u [ --plugins ] arg    Path to the plugins directory
  -h [ --help ]           help
  -V [ --version ]        version

AFL% show ( Raw_Load );
[("Raw_Load 1<ID:string NOT NULL,Name:string NOT NULL,Response:double NOT NULL> [Offset=0:134339999,134340,0]")]
AFL% show ( F1R );
[("F1R 3<Response:double NOT NULL,empty_indicator:indicator NOT NULL> [ID(string)=3000,1000,0,Name(string)=60000,1000,0]")]
AFL% count ( F1R );
AFL% join ( max ( F1R, Response ), min ( F1R, Response ) ) ;
AFL% quantile (
CON>     subarray ( F1R, 'ID_Low', 'Name_Low', 'ID_High', 'Name_High'),
CON>     10
CON> );

If what you want is a C/C++ API, SciDB has one of those too. It’s the same one we used to build iquery. It’s primitive, but there isn’t a standard to follow in this space (except for things like NetCDF/HDF, etc) so we’re going to keep it as small and simple as we can.

Oh. Note that quantile() operator? That’s not something that will ship with SciDB by default. If you need something like that, talk to us.