cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jake Luciani <jak...@gmail.com>
Subject Re: Not overwriting values
Date Tue, 21 Sep 2010 12:25:38 GMT
In theory you could use timestamps that go back in time for this CF. That way the first write
will persist over future writes. 

 

On Sep 21, 2010, at 6:58 AM, Christian Decker <decker.christian@gmail.com> wrote:

> Hi all,
> 
> I have a rather strange problem I'd like to address. As I understand it a write in cassandra
always overwrites already existing data, so it is not possible to have a way to create an
index pointing to the first entry matching some criteria. What I mean is that I have a CF
which stores user purchases and now I want to find the first time a user bought an item from
a certain class of objects. For this I was thinking about a CF with SCFs, the CF key being
the user ID and the SCF key being the class id of the item and then the value would be the
key of the purchase in the purchases CF. Obviously for this to work I'd have to check if a
value like firstPurchases[123][987] already exists and if not write it, but it there a way
to implement it without the additional read?
> 
> Regards,
> Chris

Mime
View raw message