Re: How to store a list of values?

2012-03-28 Thread R. Verlangen
Yes, that is one of the possible solutions to your problem. When you want to retrieve only the skills of a particular row just get the columns with as start value skill:. A suggestion to your example might be to use a ~ in stead of : as separator. A tilde is used less often in standard

Re: How to store a list of values?

2012-03-28 Thread R. Verlangen
If you use the CompositeColumn it does, but it looked to me in your example you just used the simple utf8-based solution. My apologies for the confusion. 2012/3/28 Ben McCann b...@benmccann.com Hmm. I thought that Cassandra would encode the composite column without the colon and that it was

Re: How to store a list of values?

2012-03-28 Thread Ben McCann
I'm leaning towards storing serialized JSON at the moment. It's too bad Cassandra doesn't have some better way of storing collections or document-oriented data (e.g. a JsonType queryable with CQL). On Wed, Mar 28, 2012 at 1:19 AM, R. Verlangen ro...@us2.nl wrote: If you use the

Re: How to store a list of values?

2012-03-27 Thread R. Verlangen
That's true, but it does not sound like a real problem to me.. Maybe someone else can shed some light upon this. 2012/3/27 samal samalgo...@gmail.com On Tue, Mar 27, 2012 at 1:47 AM, R. Verlangen ro...@us2.nl wrote: but any schema change will break it How do you mean? You don't have to

Re: How to store a list of values?

2012-03-27 Thread samal
YEAH! agree, it only matter for time bucket data. On Tue, Mar 27, 2012 at 12:31 PM, R. Verlangen ro...@us2.nl wrote: That's true, but it does not sound like a real problem to me.. Maybe someone else can shed some light upon this. 2012/3/27 samal samalgo...@gmail.com On Tue, Mar 27, 2012

Re: How to store a list of values?

2012-03-27 Thread Ben McCann
I was given one other suggestion (which may have been suggested earlier in this thread, but is clearer to me with an example). The suggestion was to use composite columns and have the first part of the key name be skill and the second part be the specific skill and then store a null value. I

How to store a list of values?

2012-03-26 Thread Ben McCann
I have a profile column family and want to store a list of skills in each profile. In BigTable I could store a Protocol Bufferhttp://code.google.com/apis/protocolbuffers/docs/overview.htmlwith a repeated field, but I'm not sure how this is typically accomplished in Cassandra. One option would be

Re: How to store a list of values?

2012-03-26 Thread samal
I would take simple approach. create one other CF UserSkill with row key same as profile_cf key, In user_skill cf will add skill as column name and value null. Columns can be added or removed. UserProfile={ '*ben*'={ blah :blah blah :blah blah :blah } } UserSkill={ '*ben*'={

Re: How to store a list of values?

2012-03-26 Thread Ben McCann
Thanks for the reply Samal. I did not realize that you could store a column with null value. Do you know if this solution would work with composite columns? It seems super columns are being phased out in favor of composites, but I do not understand composites very well yet. I'm trying to

Re: How to store a list of values?

2012-03-26 Thread samal
plus it is fully compatible with CQL. SELECT * FROM UserSkill WHERE KEY='ben'; On Mon, Mar 26, 2012 at 9:13 PM, samal samalgo...@gmail.com wrote: I would take simple approach. create one other CF UserSkill with row key same as profile_cf key, In user_skill cf will add skill as column name

Re: How to store a list of values?

2012-03-26 Thread samal
On Mon, Mar 26, 2012 at 9:20 PM, Ben McCann b...@benmccann.com wrote: Thanks for the reply Samal. I did not realize that you could store a column with null value. values can be null or any value like [default@node] set hus['test']['wowq']='\{de\'.de\;\}\+\^anything'; Value inserted.

Re: How to store a list of values?

2012-03-26 Thread Sasha Dolgy
Save the skills in a single column in json format. Job done. On Mar 26, 2012 7:04 PM, Ben McCann b...@benmccann.com wrote: True. But I don't need the skills to be searchable, so I'd rather embed them in the user than add another top-level CF. I was thinking of doing something along the

Re: How to store a list of values?

2012-03-26 Thread samal
Save the skills in a single column in json format. Job done. Good if it have fixed set of skills, then any add or delete changes need handle in app. -read column first-reformat JOSN-update column (2 thrift calls). skill~Java: null, skill~Cassandra: null This is also good option, but any

Re: How to store a list of values?

2012-03-26 Thread R. Verlangen
but any schema change will break it How do you mean? You don't have to specify the columns in Cassandra so it should work perfect. Except for the skill~ is preserverd for your list. 2012/3/26 samal samalgo...@gmail.com Save the skills in a single column in json format. Job done. Good if

Re: How to store a list of values?

2012-03-26 Thread samal
On Tue, Mar 27, 2012 at 1:47 AM, R. Verlangen ro...@us2.nl wrote: but any schema change will break it How do you mean? You don't have to specify the columns in Cassandra so it should work perfect. Except for the skill~ is preserverd for your list. In case skill~ is decided to change to