Re: CF metadata syntax for an array

2012-11-14 Thread aaron morton
s becomes significant. > > From: aaron morton [mailto:aa...@thelastpickle.com] > Sent: Wednesday, November 14, 2012 6:00 PM > To: user@cassandra.apache.org > Subject: Re: CF metadata syntax for an array > > database a hint that this will be an array? > Things are going t

RE: CF metadata syntax for an array

2012-11-14 Thread Kevin Burton
? While for a small data set this would be no big deal. But for millions or billions of orders this becomes significant. From: aaron morton [mailto:aa...@thelastpickle.com] Sent: Wednesday, November 14, 2012 6:00 PM To: user@cassandra.apache.org Subject: Re: CF metadata syntax for an array

Re: CF metadata syntax for an array

2012-11-14 Thread aaron morton
lues this basically gives the >> database a hint that this will be an array? Is there an implicit INDEX on id >> and item_id? Thanks again. >> >> -Original Message- >> From: aaron morton [mailto:aa...@thelastpickle.com] >> Sent: Wednesday, November 14, 2012

Re: CF metadata syntax for an array

2012-11-14 Thread Peter Lin
: user@cassandra.apache.org > Subject: Re: CF metadata syntax for an array > > Like this? > > cqlsh:dev> CREATE TABLE my_orders( >... id int, >... item_id int, >... price decimal, >... title text, >... PRIMARY

RE: CF metadata syntax for an array

2012-11-14 Thread Kevin Burton
[mailto:aa...@thelastpickle.com] Sent: Wednesday, November 14, 2012 4:08 PM To: user@cassandra.apache.org Subject: Re: CF metadata syntax for an array Like this? cqlsh:dev> CREATE TABLE my_orders( ... id int, ... item_id int, ... price deci

Re: CF metadata syntax for an array

2012-11-14 Thread aaron morton
Gender text, > sort_key bigint, > list_name text > …. > > > > Does the array have to be a KEY? Finally, what would be the synta

RE: CF metadata syntax for an array

2012-11-14 Thread Kevin Burton
.@thelastpickle.com] Sent: Wednesday, November 14, 2012 3:05 PM To: user@cassandra.apache.org Subject: Re: CF metadata syntax for an array In both cases the array is the PRIMARY_KEY. I'm not sure what you mean by the "array" The vector_name and list_name columns are used

Re: CF metadata syntax for an array

2012-11-14 Thread aaron morton
list_name text > …. > > In both cases the array is the PRIMARY_KEY. In order for an array to work > does the array have to be a KEY? > > From: aaron morton [mailto:aa...@thelastpickle.com] > Sent: Tuesday, November 13, 2012 10:18 PM > To:

RE: CF metadata syntax for an array

2012-11-13 Thread Kevin Burton
2012 10:18 PM To: user@cassandra.apache.org Subject: Re: CF metadata syntax for an array Would this syntax be the same for CREATE COLUMNFAMILY (as an aside what is a 'TABLE' in Cassandra)? Yes, CQL 2 uses COLUMN FAMILY or Table and CQL 3 uses TABLE http://www.datastax.com/dev/blog/

Re: CF metadata syntax for an array

2012-11-13 Thread aaron morton
list_name text > …. > > Does the array have to be a KEY? Finally, what would be the syntax for > inserting data into the CF? > > Thanks again. > > From: aaron morton [mailto:aa...@thelastpickle.com] > Sent

RE: CF metadata syntax for an array

2012-11-13 Thread Kevin Burton
ron morton [mailto:aa...@thelastpickle.com] Sent: Tuesday, November 13, 2012 4:09 AM To: user@cassandra.apache.org Subject: Re: CF metadata syntax for an array While this solves the problem for an array of 'primitive' types. What if I want an array or collection of an arbitrary type like

Re: CF metadata syntax for an array

2012-11-13 Thread aaron morton
> While this solves the problem for an array of 'primitive' types. What if I > want an array or collection of an arbitrary type like list, where foo is > a user defined type? Do you mean a custom Cassandra data type that sub classes AbstractType? I dont think CQL can support those, I may be wron

Re: CF metadata syntax for an array

2012-11-12 Thread Kevin Burton
While this solves the problem for an array of 'primitive' types. What if I want an array or collection of an arbitrary type like list, where foo is a user defined type? I am guessing that this cannot be done with 'collections'. What are the options to solve this type of array? On Nov 12, 2012,

Re: CF metadata syntax for an array

2012-11-12 Thread aaron morton
This may help http://www.datastax.com/dev/blog/cql3_collections > I have gotten as far as feeling a need to understand a ‘super-column’ You can happily ignore them. Cheers - Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 12/11/2012, at 8:35 PM,

CF metadata syntax for an array

2012-11-11 Thread Kevin Burton
I am sorry if this is an FAQ. But I was wondering what the syntax for describing an array? I have gotten as far as feeling a need to understand a 'super-column' but I fail after that. Once I have the metadata in place to describe an array how do I insert data into the array? Get data from the arra