> Is there something wrong with it? Here 1234555665_53323232 and > 2344555665_53323232 are super columns. Also, If I have to represent this data > with new composite comparator, How will I accomplish that? > >
Composite types via pycassa http://pycassa.github.io/pycassa/assorted/composite_types.html?highlight=composite Create a composite of where the super column value is the first part and the second part is the column name, this is basically what cql3 does. You will have to make all columns the same type though. Or use CQL 3, it works well for these sorts of models. Cheers ----------------- Aaron Morton New Zealand @aaronmorton Co-Founder & Principal Consultant Apache Cassandra Consulting http://www.thelastpickle.com On 20/12/2013, at 7:22 am, Kumar Ranjan <winnerd...@gmail.com> wrote: > Rob - I got a question following your advice. This is how, I define my column > family > validators = { > > 'approved': 'UTF8Type', > > 'tid': 'UTF8Type', > > 'iid': 'UTF8Type', > > 'score': 'IntegerType', > > 'likes': 'IntegerType', > > 'retweet': 'IntegerType', > > 'favorite': 'IntegerType', > > 'screen_name': 'UTF8Type', > > 'created_date': 'UTF8Type', > > 'expanded_url': 'UTF8Type', > > 'embedly_data': 'BytesType', > > } > > SYSTEM_MANAGER.create_column_family('KeySpaceNNN', 'Twitter_Instagram', > default_validation_class='UTF8Type', super=True, comparator='UTF8Type', > key_validation_class='UTF8Type', column_validation_classes=validator) > > Actual data representation: > > 'row_key': {'1234555665_53323232': {'approved': 'false', 'tid': 123, 'iid': > 346666, 'score': 2, likes: 50, retweets: 45, favorite: 34, > screen_name:'goodname'}, > > '2344555665_53323232': {'approved': 'false', 'tid': 134, > 'iid': 346666, 'score': 2, likes: 50, retweets: 45, favorite: 34, > screen_name:'newname'}. > > ..... > > } > > Is there something wrong with it? Here 1234555665_53323232 and > 2344555665_53323232 are super columns. Also, If I have to represent this data > with new composite comparator, How will I accomplish that? > > > > Please let me know. > > > > Regards. > > > > On Wed, Dec 18, 2013 at 5:32 PM, Robert Coli <rc...@eventbrite.com> wrote: > On Wed, Dec 18, 2013 at 1:28 PM, Kumar Ranjan <winnerd...@gmail.com> wrote: > Second approach ( I used in production ): > - fetch all super columns for a row key > > Stock response mentioning that super columns are anti-advised for use, > especially in brand new code. > > =Rob > >