I’m trying to access any of the functions from the more_math library (checkisprime, for example) from AQL/AFL but there’s nothing in the documentation other than how to load the library. Could you please let me know how to use these additional math functions?

While the list(); command is helpful, I didn’t see anything in your documentation that differentiated between libraries, functions, and plugins. In fact, the doc only discusses libmore_math in the plugins section, so I would have expected list(plugins); to tell me something rather than list(functions);.

We are sort of assuming that everyone who loads a plugin already knows (or has documentation for) all the extra functionality that the plugin adds. But suppose you see librational.so and you have no idea what’s in that plugin. Well, you could try running list commands with grep to figure that out:

We are sort of assuming that everyone who loads a plugin already knows (or has documentation for) all the extra functionality that the plugin adds

So there’s no way that I could write a function and document it in SciDB so that other people using my SciDB install could discover it and use it themselves?

Well, you could try running list commands with grep to figure that out:

This is helpful, thanks. I’m curious: is it the norm for most SciDB users to use the interactive mode non-interactively? By which I mean, is it usual for people to work from the Linux command line rather than the iquery CL?

Is our doc not very clear on this point?

Your documentation is not very clear on many points. What would have helped me in this case, is an example that goes from start (C++ code) to finish (AFL/AQL query) for adding new analytical processing. That’s why I ended up examining the lib_moremath examples rather than the rational data type discussed in the document.

Well feedback like this allows us to improve our product, and so, thanks for the feedback.

We’ll try to

improve the doc with an example like you mentioned

build more doc capabilities into the software so that tasks like “describe to me all the user-defined elements from this plugin” become much easier

Here’s my take on how to interact with scidb in general. At this point, different people definitely do very different things. Some say the CLI is sufficient. Some folks write their own clients altogether (i.e. via our Python api). For me, for most of the work that I’ve been doing - I prefer using afl, and I prefer to always view the results in csv+ form. Sometimes the result sets are huge and I like to save them to temporary files. So I’ve actually written a little bash thing that I use:

It brings up a less window with the query result. I can scroll through the output and search through it. And, at other times

$ afl "scan(foo)" > foo.csv

allows me to save things to an output file.

And of course, sometimes you’re running a store() query and you don’t want to see the output at all. Sometimes non-integer dimensions come into play and you want to examine them. But generally, after I came up with this little afl helper, I found it was pretty comfortable to use and did the job in a lot of cases for me.

Thanks for the bash script, that’s really nice. I have been mostly using AFL since the doc says AQL doesn’t have all the functionality so this will be handy.

I notice all your stuff is for single commands. How do you handle complex processing? If I need to do multiple steps, do I break it into multiple functions? I assume that if I have one function handle everything then I’m not able to debug in SciDB? If I go the route of multiple function/multiple intermediate arrays, is there anyway to send all the processing commands at once, or do I need to do them one at a time?

Also, I’d heard there was a way to make a change to an intermediate product cascade automatically so that the later values are updated; is that in the documentation?

Also, I’d heard there was a way to make a change to an intermediate product cascade automatically so that the later values are updated; is that in the documentation?

I believe you’re referring to either provenance and materialized views. These features are not implemented yet.

As far as “how to do complex processing” - again there is a variety of options here. In the use cases I’ve encountered, I’ve relied primarily on little shell scripts and found them quite adequate. At times, they do become a bit painful to edit, but overall, once you get a script to work, it becomes a fairly stable “procedure” that you can store and reuse. Just as easily as shell scripts, you could write perl scripts or python apps or even C++ code that sends queries to scidb directly. It does depend on the use case.

Here’s a little shell script I wrote to demonstrate. It’s completely standalone and you should be able to run it on your setup. It creates a sample CSV file of american presidents, loads it into scidb and performs some simple calculations. After the script is finished, you have three new arrays in the system: us_presidents, president_stats and yio_histogram.

apoliakov@scalpel:~/workspace/scidb_trunk$ ./sample_script.sh
Removing old arrays...
Loading presidents...
Computing statistics on presidents...
Created president_stats array...
There were 44 presidents in the US
The average present spent 5.11628 years in office
President "roosevelt","franklin" was one of the longest serving with 12 years in office
Computing a histogram by years in office...
There were 13 presidents who served for 8 years. They are: "jefferson, madison, monroe, jackson, washington, clinton, bush, grant, roosevelt, wilson, truman, eisenhower, reagan, "
apoliakov@scalpel:~/workspace/scidb_trunk$ iquery -o csv -aq "list()"
name
"president_stats"
"us_presidents"
"yio_histogram"