incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brosius <dbros...@mebigfatguy.com>
Subject Re: Supercolumn behavior on writes
Date Thu, 14 Jun 2012 03:42:20 GMT
Via thrift, or a high level client on thrift, see as an example

http://www.datastax.com/dev/blog/introduction-to-composite-columns-part-1

On 06/13/2012 11:08 PM, Greg Fausak wrote:
> Interesting.
>
> How do you do it?
>
> I have a version 2 CF, that works fine.
> A version 3 table won't let me invent columns that
> don't exist yet. (for composite tables).  What's the trick?
>
> cqlsh -3 cas1
> use onplus;
> cqlsh:onplus>  select * from at_event where ac_event_id = 7690254;
>   ac_event_id | ac_creation              | ac_event_type | ac_id | ev_sev
> -------------+--------------------------+---------------+-------+--------
>       7690254 | 2011-07-23 00:11:47+0000 | SERV.CPE.CONN |   \N |      5
> cqlsh:onplus>  update at_event set wingy = 'toto' where ac_event_id = 7690254;
> Bad Request: Unknown identifier wingy
>
> This is what I used to create it:
> //
> // create the event column family, this contains the static
> // part of the definition.  many additional columns can be specified
> // in the port from relational, these would be mainly the at_event table
> //
>
> use onplus;
>
> create columnfamily
>      at_event
> (
>      ac_event_id int PRIMARY KEY,
>      ac_event_type text,
>      ev_sev int,
>      ac_id text,
>      ac_creation timestamp
> ) with compression_parameters:sstable_compression = ''
> ;
>
> -g
>
>
>
>
> On Wed, Jun 13, 2012 at 9:36 PM, samal<samalgorai@gmail.com>  wrote:
>>   You can't 'invent' columns on the fly, everything has
>>>> to be declared when you declare the column family.
>>>>
>>   That' s incorrect. You can define name on fly. Validation must be define
>> when declaring CF
>>


Mime
View raw message