You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Frank Yang <fa...@gmail.com> on 2012/01/06 18:59:36 UTC
Dynamic columns in a column family?
Hi everyone,
I am wondering whether it is possible to not to define the column
metadata when creating a column family, but to specify the column when
client updates data, for example:
CREATE COLUMN FAMILY products WITH default_validation_class= UTF8Type
AND key_validation_class=UTF8Type AND comparator=UTF8Type;
set products['1001']['brand']= ‘Sony’;
In other words, we don't want to fix the columns definition when
creating a column family, as we might have to insert new columns into
the column family. Is it possible to achieve it?
Thanks,
Fan
Re: Dynamic columns in a column family?
Posted by Jonathan Ellis <jb...@gmail.com>.
Yes.
(Please keep these to the user list rather than dev.)
On Fri, Jan 6, 2012 at 11:59 AM, Frank Yang <fa...@gmail.com> wrote:
> Hi everyone,
>
> I am wondering whether it is possible to not to define the column
> metadata when creating a column family, but to specify the column when
> client updates data, for example:
>
> CREATE COLUMN FAMILY products WITH default_validation_class= UTF8Type
> AND key_validation_class=UTF8Type AND comparator=UTF8Type;
> set products['1001']['brand']= ‘Sony’;
>
> In other words, we don't want to fix the columns definition when
> creating a column family, as we might have to insert new columns into
> the column family. Is it possible to achieve it?
>
> Thanks,
> Fan
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com
Re: Dynamic columns in a column family?
Posted by Vivek Mishra <vi...@yahoo.com>.
I think Cassandra automatically handles it. isn't it?
________________________________
From: Frank Yang <fa...@gmail.com>
To: dev@cassandra.apache.org
Sent: Friday, January 6, 2012 11:30 PM
Subject: Dynamic columns in a column family?
Hi everyone,
I am wondering whether it is possible to not to define the column
metadata when creating a column family, but to specify the column when
client updates data, for example:
CREATE COLUMN FAMILY products WITH default_validation_class= UTF8Type
AND key_validation_class=UTF8Type AND comparator=UTF8Type;
set products['1001']['brand']= ‘Sony’;
In other words, we don't want to fix the columns definition when
creating a column family, as we might have to insert new columns into
the column family. Is it possible to achieve it?
Thanks,
Fan
Dynamic columns in a column family?
Posted by Frank Yang <fa...@gmail.com>.
Hi everyone,
I am wondering whether it is possible to not to define the column
metadata when creating a column family, but to specify the column when
client updates data, for example:
CREATE COLUMN FAMILY products WITH default_validation_class= UTF8Type
AND key_validation_class=UTF8Type AND comparator=UTF8Type;
set products['1001']['brand']= ‘Sony’;
In other words, we don't want to fix the columns definition when
creating a column family, as we might have to insert new columns into
the column family. Is it possible to achieve it?
Thanks,
Fan