Astyanax allows you to execute CQL statements. I don’t remember the details, 
but it is there.

One tip – when you create the column family, use CLUSTERING ORDER WITH 
(timestamp DESC). Then you query becomes straightforward and C* will do all the 
heavy lifting for you.

Mohammed

From: Ravi Agrawal [mailto:ragra...@clearpoolgroup.com]
Sent: Tuesday, February 3, 2015 11:54 AM
To: user@cassandra.apache.org
Subject: RE: Smart column searching for a particular rowKey

Cannot find something corresponding to where clause there.

From: Ravi Agrawal [mailto:ragra...@clearpoolgroup.com]
Sent: Tuesday, February 03, 2015 2:44 PM
To: user@cassandra.apache.org<mailto:user@cassandra.apache.org>
Subject: RE: Smart column searching for a particular rowKey

Thanks, it does.
How about in astyanax?

From: Eric Stevens [mailto:migh...@gmail.com]
Sent: Tuesday, February 03, 2015 1:49 PM
To: user@cassandra.apache.org<mailto:user@cassandra.apache.org>
Subject: Re: Smart column searching for a particular rowKey

WHERE < + ORDER DESC + LIMIT should be able to accomplish that.

On Tue, Feb 3, 2015 at 11:28 AM, Ravi Agrawal 
<ragra...@clearpoolgroup.com<mailto:ragra...@clearpoolgroup.com>> wrote:
Hi Guys,
Need help with this.
My rowKey is stockName like GOOGLE, APPLE.
Columns are sorted as per timestamp and they include some set of data fields 
like price and size. So, data would be like 1. 9:31:00, $520, 100 shares 2. 
9:35:09, $530, 1000 shares 3. 9:45:39, $520, 500 shares
I want to search this column family using partition key timestamp.
For a rowkey, if I search for data on partition id 9:33:00 which does not 
actually exist in columns, I want to return the last value where data was 
present. In this case 9:31:00, $520, 100 shares, since the next partitionkey is 
9:35:09 which is greater than input value entered.
One obvious way would be iterating through each columns and storing last data, 
if new timestamp is greater than given timestamp then return the last data 
stored.
Is it any optimized way to achieve the same? Since columns are already sorted.
Thanks



Reply via email to