Querying Supercolumn Family

Mar 21, 2012 at 11:12 AM

Hi,

I hope you can help me, your library is the only one that seems to be any good for cassandra but I'm having difficulty querying against a super column family.

var e = from x in context.SuperColumn
            where x.Key == "1813"
            && (x.ColumnFamily == "series")
            select x;

This throws an "Exception of type 'Apache.Cassandra.InvalidRequestException' was thrown." exception.

The 'why' is "supercolumn parameter is not optional for super CF series"

There are no examples in your documentation on how to query a supercolumn family, so, is it even possible?

The matrix you have in the querying documentation is very confusing and of no use to anyone.

Mar 21, 2012 at 11:15 AM

Further to this.  The 'name' for each super column is a TimeUUIDType, how do I query the data to get all information between two timestamps?

Thanks.

Mar 21, 2012 at 3:07 PM

Got somewhere.

 

 

var e = from x in context.SuperColumnList
                        where x.Key == "1813"
                        && v.SuperColumn.Between(timeGeneratorGetTimeUUID, timeGeneratorGetTimeUUID2)
                        && (x.ColumnFamily == "series")
                        select x;

 

Which returns an list of one. this then has a data of 100 super columns. 

I know for a fact that there are more than 100.  So, I've done a bit of digging and found [discussion:276894] that.

Calling

                e.TakeColumn(int.MaxValue-1);

Has no effect on this.  How can I make it select all of the data?

 

 

 

Developer
Mar 22, 2012 at 5:35 PM

Hm. I'm sorry for writing this without actually testing, but are you sure you got only one?

context.SuperCOlumnList returns List<CassandraEntity<List<SuperColumn>>, so I wonder, maybe, e.Count == 1 but e[0].Data.Count may be 100. In this expression, e[] represents the resulting rows, and e.Data[] represents the resulting columns.

Sorry if this wasn't the case in advance.