I’m curious about the Python Client examples on Github.
I installed Aerospike on my Linux box.
And started it up so it listens at
Then I installed the Python Client using
pip install aerospike
Then I git-cloned the examples:
cd ~ git clone email@example.com:aerospike/aerospike-client-python.git
I ran this example:
It worked well.
Now I’m looking at this script:
I’m not sure what it is supposed to teach me.
I tried this:
$ python examples/client/aggregate.py Usage: aggregate.py [options] where module function [args...] Options: -h <ADDRESS>, --host=<ADDRESS> Address of Aerospike server. -p <PORT>, --port=<PORT> Port of the Aerospike server. --help Displays this message. -n <NS>, --namespace=<NS> Port of the Aerospike server. -s <SET>, --set=<SET> Port of the Aerospike server. -b BINS, --bins=BINS Bins to select from each record.
I understand that I can pass in a set and bins so that seems easy.
I dont understand this part of the command line signature:
where module function [args...]
Where do I learn about this?
I sense this example assumes a level of knowledge about Aerospike which I don’t have yet.
I looked at
with my editor.
The script seemed to assume that my set and bins had a structure known to the script.
Aside from that I did not find anything useful for learning.
The name aggregate.py suggests to me that I’d learn how to aggregate.
I want to learn how to do the SQL equivalent of something like this:
SELECT AVG(weight) FROM persons WHERE location = 'NY';
Or maybe something like this:
SELECT gender, MAX(age) FROM persons GROUP BY gender;