Query regarding retrival of data

Travis Kirstine tkirstine at firstbasesolutions.com
Thu Apr 6 08:31:16 EDT 2017



From: riak-users [mailto:riak-users-bounces at lists.basho.com] On Behalf Of Master Mind
Sent: April-05-17 3:03 PM
To: riak-users at lists.basho.com
Subject: Query regarding retrival of data

Hi all,
Greeting for this day.

I have successfully inserted data into the riak database using riak-python client and currently, I'm using single node configuration. I'm refering to http://riak-python-client.readthedocs.io/en/2.2.0/client.html this website for a tutorial but I'm having lots of problem in getting the clear solution.

my system configuration is:
OS - Ubuntu Trusty LTS
Python - 2.7.6
Riak KV - 2.1.4

So my question is that now:

Q) I want to see what are all the buckets that are present in my database at this moment?


http://riak-python-client.readthedocs.io/en/2.2.0/client.html#riak.client.RiakClient.stream_buckets



Q) If I know the name of the buckets then is there any way to retrieve all the keys that bucket have?

http://riak-python-client.readthedocs.io/en/2.2.0/client.html#riak.client.RiakClient.get_keys
http://riak-python-client.readthedocs.io/en/2.2.0/client.html#riak.client.RiakClient.stream_keys


Q) Is there any possibility by which we can specify the WHERE condition as we do in SQL?

Yes and no.  The basic .get will return a contents where bucket= and key=

http://riak-python-client.readthedocs.io/en/2.2.0/client.html#riak.client.RiakClient.get

Beyond that you would need to setup riak search

http://docs.basho.com/riak/kv/2.2.1/developing/usage/search/

or secondary indexes

http://docs.basho.com/riak/kv/2.2.1/using/reference/secondary-indexes/





Please help me in this.
Any documentation or website or any kind of help is apprecited.

Mr. Coder,
MTECH in Distributed Database,
National Institute of Technology. INDIA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20170406/c9184342/attachment-0002.html>


More information about the riak-users mailing list