Can I Query Cassandra columns with Pycassa?
-
I have Cassandra DB similar to this: key | name | client 1 A C1 2 B C2 3 C C1 I access to my cassandra db with Pyhton (pycassa). Is there a way to query the database in order to get the clients with the most number of occurrences. For instance in this case it is C1 with 2. I am not sure if it is possible to directly query cassandra with pycassa. If it is possible, how can i achieve that or should i use extra tools? Thanks PS: I need to use nosql so please do not suggest me to use relational db.
-
Answer:
No, there is no built-in way of doing that. You would need to keep track of occurrences manually using Counter Columns (http://www.datastax.com/dev/blog/whats-new-in-cassandra-0-8-part-2-counters). You can create a Counter row per Client and increment/decrement every time you insert/delete rows in your main column family.
Drew Kutcharian at Quora Visit the source
Related Q & A:
- How can I optimize this dynamic SQL query in oracle with PL/SQL?Best solution by docs.oracle.com
- How I can display Rows into Columns?Best solution by Server Fault
- How can I query Parse data by creation date with Swift?Best solution by Stack Overflow
- How can I convert the query from SQL to LINQ?Best solution by Stack Overflow
- Can i change a regular phone into a smartphone? if i can how?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.