I also think that's not a good design, but only because the typical query
would have to hit several column families instead of just one.

To answer your question, use a
http://wiki.apache.org/cassandra/API#KeyRange which
includes AAPL across all years you might want in your
http://wiki.apache.org/cassandra/API#get_range_slices query.
On Thu, May 13, 2010 at 2:39 PM, Steve Lihn <stevel...@gmail.com> wrote:

> I am not sure this is a good design in Cassandra.
> What if I just want to get all the data points for AAPL? Since AAPL is not
> a key, how does Cassandra get the data if I don't provide the years?
>
>
> On Thu, Apr 29, 2010 at 1:09 AM, Schubert Zhang <zson...@gmail.com> wrote:
>
>> key : stock ID,  e.g. AAPL+year
>> column family: closting price and valume, tow CFs.
>> colum name: timestamp LongType
>>
>> AAPL+2010-> CF:closingPrice -> {'04-13' : 242, '04-14': 245}
>> AAPL+2010-> CF:volume -> {'04-13' : 242, '04-14': 245}
>>
>>
>>

Reply via email to