Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49743100E9 for ; Thu, 6 Jun 2013 15:28:00 +0000 (UTC) Received: (qmail 6270 invoked by uid 500); 6 Jun 2013 15:27:57 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 6247 invoked by uid 500); 6 Jun 2013 15:27:57 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 6239 invoked by uid 99); 6 Jun 2013 15:27:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 15:27:57 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of arodrime@gmail.com designates 209.85.217.180 as permitted sender) Received: from [209.85.217.180] (HELO mail-lb0-f180.google.com) (209.85.217.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jun 2013 15:27:51 +0000 Received: by mail-lb0-f180.google.com with SMTP id o10so833703lbi.25 for ; Thu, 06 Jun 2013 08:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=D4Qys2VWMzV6eJKgTB3XfuOb6l26KGAGSgK2RZI9Rlw=; b=ZVX8NXTsOK8aFTJO29DIwLU5GWXGMaOfnlvtl5EvWnoy1x5N1QbwOA2bKsSMsjECIC kGhKgGGrR7fpG62gCdGYylq4ROLACZTwMuCQFMVx+gK0kVVg/nUEk4GzuQ8Db+5nlnF6 aoPwMvROqBqlCVtMvEpLoIotIecCxapHcStJFQ9OMOrJ+UR8Oc6cdnLs9wc4sjcwft0c 13exoQtqDvOskRGJHLG6zEU8kDgWPWol2+zTUghC0FztmpB6Vefner2k8hyFEP/hLksb 5nEO9mYfHuOoUqTK0T3vbvjeJbCWC49UO73UwEh0SCz6cdzy6f8zZwA5ysrRGX0dOKr6 wTmQ== X-Received: by 10.152.3.102 with SMTP id b6mr1388405lab.22.1370532450973; Thu, 06 Jun 2013 08:27:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.7.168 with HTTP; Thu, 6 Jun 2013 08:27:10 -0700 (PDT) In-Reply-To: References: From: Alain RODRIGUEZ Date: Thu, 6 Jun 2013 17:27:10 +0200 Message-ID: Subject: Re: Dynamic Columns Question Cassandra 1.2.5, Datastax Java Driver 1.0 To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=089e01493fd2e4c43204de7df3b5 X-Virus-Checked: Checked by ClamAV on apache.org --089e01493fd2e4c43204de7df3b5 Content-Type: text/plain; charset=ISO-8859-1 Not sure if you remember this Jonathan, but Sylvain already wrote a very clear documentation about it : http://www.datastax.com/dev/blog/thrift-to-cql3 (OCTOBER 26, 2012) Yet a second page will give to this important topic a greater visibility. 2013/6/6 Jonathan Ellis > This is becoming something of a FAQ, so I wrote an more in-depth > answer: > http://www.datastax.com/dev/blog/does-cql-support-dynamic-columns-wide-rows > > On Thu, Jun 6, 2013 at 8:02 AM, Joe Greenawalt > wrote: > > Hi, > > I'm having some problems figuring out how to append a dynamic column on a > > column family using the datastax java driver 1.0 and CQL3 on Cassandra > > 1.2.5. Below is what i'm trying: > > > > cqlsh:simplex> create table user (firstname text primary key, lastname > > text); > > cqlsh:simplex> insert into user (firstname, lastname) values > > ('joe','shmoe'); > > cqlsh:simplex> select * from user; > > > > firstname | lastname > > -----------+---------- > > joe | shmoe > > > > cqlsh:simplex> insert into user (firstname, lastname, middlename) values > > ('joe','shmoe','lester'); > > Bad Request: Unknown identifier middlename > > cqlsh:simplex> insert into user (firstname, lastname, middlename) values > > ('john','shmoe','lester'); > > Bad Request: Unknown identifier middlename > > > > I'm assuming you can do this based on previous based thrift based clients > > like pycassa, and also by reading this: > > > > The Cassandra data model is a dynamic schema, column-oriented data model. > > This means that, unlike a relational database, you do not need to model > all > > of the columns required by your application up front, as each row is not > > required to have the same set of columns. Columns and their metadata can > be > > added by your application as they are needed without incurring downtime > to > > your application. > > > > here: http://www.datastax.com/docs/1.2/ddl/index > > > > Is it a limitation of CQL3 and its connection vs. thrift? > > Or more likely i'm just doing something wrong? > > > > Thanks, > > Joe > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder, http://www.datastax.com > @spyced > --089e01493fd2e4c43204de7df3b5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Not sure if you remember this Jonathan, but Sylvain alread= y wrote a very clear documentation about it :=A0http://www.datastax.com/dev/blog/thrift-to= -cql3=A0(OCTOBER 26, 2012)

Yet a second page will give to this important topic a greate= r visibility.


2013/6/6 Jonathan Ellis <jbellis@gmail.com>
This is becoming something of a FAQ, so I wr= ote an more in-depth
answer: http://www.datastax.com/dev/blog/doe= s-cql-support-dynamic-columns-wide-rows

On Thu, Jun 6, 2013 at 8:02 AM, Joe Greenawalt <joe.greenawalt@gmail.com> wrote:
> Hi,
> I'm having some problems figuring out how to append a dynamic colu= mn on a
> column family using the datastax java driver 1.0 and CQL3 on Cassandra=
> 1.2.5. =A0Below is what i'm trying:
>
> cqlsh:simplex> create table user (firstname text primary key, lastn= ame
> text);
> cqlsh:simplex> insert into user (firstname, lastname) values
> ('joe','shmoe');
> cqlsh:simplex> select * from user;
>
> =A0firstname | lastname
> -----------+----------
> =A0 =A0 =A0 =A0joe | =A0 =A0shmoe
>
> cqlsh:simplex> insert into user (firstname, lastname, middlename) v= alues
> ('joe','shmoe','lester');
> Bad Request: Unknown identifier middlename
> cqlsh:simplex> insert into user (firstname, lastname, middlename) v= alues
> ('john','shmoe','lester');
> Bad Request: Unknown identifier middlename
>
> I'm assuming you can do this based on previous based thrift based = clients
> like pycassa, and also by reading this:
>
> The Cassandra data model is a dynamic schema, column-oriented data mod= el.
> This means that, unlike a relational database, you do not need to mode= l all
> of the columns required by your application up front, as each row is n= ot
> required to have the same set of columns. Columns and their metadata c= an be
> added by your application as they are needed without incurring downtim= e to
> your application.
>
> here: http://www.datastax.com/docs/1.2/ddl/index
>
> Is it a limitation of CQL3 and its connection vs. thrift?
> Or more likely i'm just doing something wrong?
>
> Thanks,
> Joe



--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder, http://ww= w.datastax.com
@spyced

--089e01493fd2e4c43204de7df3b5--