Request a Scidb AQL and AFL command shell terminal


#1

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?

Sincerely,


#2

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.


#3

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 
                          'localhost'.
  -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 
                          'console'.
  -n [ --no-fetch ]       Skip data fetching.
  -o [ --format ] arg     Output format: auto, csv, csv+, sparse. Default is 
                          'auto'.
  -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 );
[(117879301)]
AFL% join ( max ( F1R, Response ), min ( F1R, Response ) ) ;
[(1.6215e+06,0)]
AFL% quantile (
CON>     subarray ( F1R, 'ID_Low', 'Name_Low', 'ID_High', 'Name_High'),
CON>     10
CON> );
[(0,0.2803),(0.1,11.712),(0.2,29.5771),(0.3,48.4185),(0.4,71.7231),(0.5,101.095),(0.6,139.428),(0.7,191.332),(0.8,272.775),(0.9,465.98),(1,277048)]

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.