Re: data modelling

2019-03-05 Thread Stefan Miklosovic
Hi Bobbie, as Kenneth already mentioned, you should model your schema based on what queries you are expecting to do and read related literature. From what I see your table is named "customer_sensor_tagids" so its quite possible you would have tagids as a part of primary key? Something like:

RE: data modelling

2019-03-05 Thread Kenneth Brotman
that in the query? If you could have tagid not be a collection, and make it part of the primary key, that would help a lot. From: Kenneth Brotman [mailto:kenbrot...@yahoo.com.INVALID] Sent: Tuesday, March 05, 2019 4:33 PM To: user@cassandra.apache.org Subject: RE: data modelling Hi Bobbie

RE: data modelling

2019-03-05 Thread Kenneth Brotman
Hi Bobbie, You’re not giving enough information to model the data. With Cassandra it’s based on the queries you are going to need. This link to Jeffrey Carpenter’s book, Cassandra the Definitive Guide, Chapter 5, which is on how to do data modeling for Cassandra, should be of help to you:

Re: Data modelling, including cleanup

2016-04-11 Thread Bo Finnerup Madsen
Hi Hannu, Thank you for the pointer. We ended up using materialized views in cassandra 3.0.3. Seems to do the trick :) tor. 17. mar. 2016 kl. 11.16 skrev Hannu Kröger : > Hi, > > That’s how I have done it in many occasions. Nowadays there is the > possibility use Cassandra

Re: Data modelling, including cleanup

2016-03-19 Thread Hannu Kröger
Hi, That’s how I have done it in many occasions. Nowadays there is the possibility use Cassandra 3.0 and materialised views so that you don’t need to keep two tables up to date manually: http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views

Re: Data Modelling Help

2015-05-04 Thread Paulo Motta
This article explains when it's OK to use secondary indexes in Cassandra: http://www.wentnet.com/blog/?p=77 PS: the article is from 2013, so it can be outdated by now.. but at least it should give you some preliminary background on the topic. 2015-04-29 16:44 GMT-03:00 Robert Coli

RE: Data Modelling Help

2015-04-29 Thread Donald Smith
Secondary indicies are inefficient and are deprecated, as far as I know. Unless you store many thousands of emails for a long time (which I recommend against), just use a single table with the partition key being the userid and the timestamp being the clustering (column) key, as in your schema.

Re: Data Modelling Help

2015-04-29 Thread Robert Coli
On Wed, Apr 29, 2015 at 9:01 AM, Donald Smith donald.sm...@audiencescience.com wrote: Secondary indicies are inefficient and are deprecated, as far as I know. They are not deprecated, the correct summary is that they should only be used in very particular circumstances. If you're not sure if

Re: Data Modelling Information

2013-12-11 Thread Aaron Morton
create table messages( body text, username text, tags settext PRIMARY keys(username,tags) ) This statement is syntactically invalid, also you cannot use a collection type in the primary key. 1) I should be able to query by username and get all the messages for a

Re: Data modelling for range retrieval. Was: Re: Hadoop/Cassandra for data transformation (rather than analysis)?

2013-08-14 Thread Aaron Morton
Is it good practice then to find an attribute in my data that would allow me to form wide row row keys with aprox. 1000 values each? You can do that using get_range_slice() via thrift. And via CQL 3 you use the token() function and Limit with a select statement. Check the DS docs for more

Re: Data Modelling Suggestions

2012-08-26 Thread aaron morton
@cassandra.apache.orgmailto:user@cassandra.apache.org user@cassandra.apache.orgmailto:user@cassandra.apache.org To: user@cassandra.apache.orgmailto:user@cassandra.apache.org user@cassandra.apache.orgmailto:user@cassandra.apache.org Subject: Re: Data Modelling Suggestions I was trying to find hector

Re: Data Modelling Suggestions

2012-08-24 Thread aaron morton
I was trying to find hector examples where we search for second column in a composite column, but I couldn't find any good one. Im not sure if its possible.…if you have any do have any example please share. It's not. When slicing columns you can only return one contiguous range. Anyway I

Re: Data Modelling Suggestions

2012-08-24 Thread Roshni Rajagopal
-To: user@cassandra.apache.orgmailto:user@cassandra.apache.org user@cassandra.apache.orgmailto:user@cassandra.apache.org To: user@cassandra.apache.orgmailto:user@cassandra.apache.org user@cassandra.apache.orgmailto:user@cassandra.apache.org Subject: Re: Data Modelling Suggestions I was trying

Re: Data Modelling Suggestions

2012-08-23 Thread Guillermo Winkler
I think you need another CF as index. user_itemid - timestamped column_name Otherwise you can't guess what's the timestamp to use in the column name. Anyway I would prefer storing the item-ids as column names in the main column family and having a second CF for the order-by-date query only with

Re: Data modelling question

2010-06-14 Thread Benjamin Black
On Mon, Jun 14, 2010 at 6:09 AM, Per Olesen p...@trifork.com wrote: So, in my use case, when searching on e.g. company, I can then access the DashboardCompanyIndex with a slice on its SC and then grab all the uuids from the columns, and after this, make a lookup in the Dashboard CF for each

Re: Data modelling question

2010-06-14 Thread Per Olesen
On Jun 14, 2010, at 6:29 PM, Benjamin Black wrote: On Mon, Jun 14, 2010 at 6:09 AM, Per Olesen p...@trifork.com wrote: So, in my use case, when searching on e.g. company, I can then access the DashboardCompanyIndex with a slice on its SC and then grab all the uuids from the columns, and