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 4939F9F88 for ; Wed, 5 Oct 2011 20:36:09 +0000 (UTC) Received: (qmail 11148 invoked by uid 500); 5 Oct 2011 20:36:07 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 11124 invoked by uid 500); 5 Oct 2011 20:36:07 -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 11116 invoked by uid 99); 5 Oct 2011 20:36:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 20:36:07 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a83.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 20:36:01 +0000 Received: from homiemail-a83.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a83.g.dreamhost.com (Postfix) with ESMTP id 398BA5E06E for ; Wed, 5 Oct 2011 13:35:36 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=content-type :mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; q=dns; s= thelastpickle.com; b=E7+eE0HDGL21rhCUQJgHTXyzRpj4ktx2B7UPLiQEzev D3apJ0mCC1OHskHi0JeGQhemftYYZVDgR6g6Xh+yZGRTAjot7Nz/tz9CO52sfxKs aOlumufCQxZruo1GPgIfVRu+sGCsf/ah17nV89JW2cKltHXnO7IeFYRHPrzIfB4k = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h= content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; s= thelastpickle.com; bh=ywCSQMS6QRryCoWaLr2AmHEGQwI=; b=fD6Z8XMjzZ lJ3cW6HgjN+vJLSa4zVuK1qvho8PB6ly/1v0kNOUPa6B3sBqe8jBdONNjt/7Acwz H28X237gaTYCjbUyN8Ooxt5Zm30QLukJFyfnYQp+SZ0PDTX4dvIvh5nNOygAfvEF /LzNJCygOFhOHzueuR8ryo+vHKyZzAaa0= Received: from [172.16.1.4] (222-152-101-125.jetstream.xtra.co.nz [222.152.101.125]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a83.g.dreamhost.com (Postfix) with ESMTPSA id BD9005E06D for ; Wed, 5 Oct 2011 13:35:35 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1244.3) Subject: Re: cassandra-cli: Create column family with composite column name From: aaron morton In-Reply-To: Date: Thu, 6 Oct 2011 09:35:33 +1300 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: user@cassandra.apache.org X-Mailer: Apple Mail (2.1244.3) Hi Jim,=20 The best resource I know so far is = http://www.slideshare.net/edanuff/indexing-in-cassandra =20 I just started working on a blog post about them last night, and I hope = to update the wiki with some information when I am done. Feel free to = mail me directly if you want to collaborate.=20 I'm none the wiser on the ":" issue, one of the things I was hoping to = learn about.=20 Cheers ----------------- Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 6/10/2011, at 9:08 AM, Jim Ancona wrote: > Using Cassandra 0.8.6, I've been trying to figure out how to use the > CLI to create column families using composite keys and column names. > The documentation on CompositeType seems pretty skimpy. But in the > course of writing this email to ask how to do it, I figured out the > proper syntax. In the hope of making it easier for the next person, I > repurposed this message to document what I figured out. I'll also > update the wiki. Here is the syntax: >=20 > create column family MyCF > with key_validation_class =3D 'CompositeType(UTF8Type, = IntegerType)' > and comparator =3D 'CompositeType(DateType(reversed=3Dtrue), = UTF8Type)' > and default_validation_class=3D'CompositeType(UTF8Type, DateType)' > and column_metadata=3D[ > { column_name:'0:my Column Name', validation_class:LongType, > index_type:KEYS} > ]; >=20 > One weakness of this syntax is that there doesn't seem to be a way to > escape a ':' in a composite value. There's a FIXME in the code to that > effect. >=20 > Jim