cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David McNelis <dmcne...@agentisenergy.com>
Subject Re: data modeling question
Date Wed, 30 Nov 2011 21:56:32 GMT
You wouldn't query for all the keys that have a column name x exactly.
 Instead what you would do is for sector x grab your list of symbols S.
 Then you would get the last column for each of those symbols (which you do
in different ways depending on the API), and then test if that date is
within your threshold.  If not, it goes into your list of symbols to fetch.


Alternatively, you could iterate over the symbols grabbing data where the
date is between range A and B, if you get an empty set / no columns
returned, then you need to re-pull for that symbol.  Does that make sense?

Either way you end up hitting on each of the individual symbols.  Maybe
someone else has a better idea of how to structure the data for that
particular use case.

On Wed, Nov 30, 2011 at 3:45 PM, Deno Vichas <deno@syncopated.net> wrote:

> with the quote CF below how would one query for all keys that have a
> column name value that have a timeuuid of later than x minutes?  i need to
> be able to find all symbols that have not been fetch in x minutes by
> sector.  i know i get list of symbol by sector from my sector CF.
>
> thanks,
> deno
>
>
> On 11/30/2011 1:07 PM, David McNelis wrote:
>
>>
>> Then I would have a column family for quotes where I have the key as the
>> symbol, the column name as the timestamp, the value as the quote:
>>
>> quote : {
>>    key: symbol
>>    column names:  timeuuid
>>    column values:  quote at that time for that symbol
>> }
>>
>>
>>
>


-- 
*David McNelis*
Lead Software Engineer
Agentis Energy
www.agentisenergy.com
c: 219.384.5143

*A Smart Grid technology company focused on helping consumers of energy
control an often under-managed resource.*

Mime
View raw message