incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krishna melkote <krishna.melk...@gmail.com>
Subject Re: Cassandra super column query
Date Thu, 16 Feb 2012 12:21:16 GMT
Hello,



I have recently started using Cassandra. I have designed a super column as
below. It is basically a set of university results.  I am using Hector java
API to interface with Cassandra. I am struggling a bit to find what is the
proper way to query the results for a particular registration number (
1DS00TE018 ).



I would like to perform a query with hector which is synonymous in
Cassandra-cli as below. Any help will be greatly appreciated.



get Results[‘1DS00TE018’];

-          Returns all subject  results i.e PHY1 data, CHE1 data  and MAT1
data.



Results : {



                1DS00TE018 : {

                                PHY1: {

                                                subject : Physics,

                                                practicalMarks :  99,

                                                internalMarks : 21,

                                                theoryMarks :  99,

                                               grade :   'A',

                                                result:   pass

                                },



                                CHE1: {

                                                subject : Chemistry,

                                                practicalMarks :  99,

                                                internalMarks : 21,

                                                theoryMarks :  99,

                                               grade :   'A',

                                                result:   pass

                                },



                                MAT1: {

                                                subject : Mathematics,

                                                practicalMarks :  99,

                                                internalMarks : 21,

                                                theoryMarks :  99,

                                               grade :   'A',

                                                result:   pass

                                },

                },



                1DS00TE019 : {

                                PHY1: {

                                                subject : Physics,

                                                practicalMarks :  99,

                                                internalMarks : 21,

                                                theoryMarks :  99,

                                               grade :   'A',

                                                result:   pass

                                },



                                CHE1: {

                                                subject : Chemistry,

                                                practicalMarks :  99,

                                                internalMarks : 21,

                                                theoryMarks :  99,

                                               grade :   'A',

                                                result:   pass

                                },



                                MAT1: {

                                                subject : Mathematics,

                                                practicalMarks :  99,

                                                internalMarks : 21,

                                                theoryMarks :  99,

                                               grade :   'A',

                                                result:   pass

                                },

                }







}


Cheers
Krishna

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message