<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DataStax Support Forums &#187; Topic: Can I get number of columns by rowkey in CQL?</title>
		<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Mon, 20 May 2013 12:48:11 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.datastax.com/support-forums/search.php</link>
		</textInput>
		<atom:link href="http://www.datastax.com/support-forums/rss/topic/can-i-get-number-of-columns-by-rowkey-in-cql" rel="self" type="application/rss+xml" />

		<item>
			<title>Anonymous on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1918</link>
			<pubDate>Wed, 16 May 2012 01:50:10 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1918@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;&#60;a href=&#34;http://www.clearance-polo-shirts.com&#34; title=&#34;clearance polo shirts &#34;&#62;clearance polo shirts&#60;/a&#62; are also referred to as &#34;polos&#34; in addition to grew to become so famous about world of golf training; men and women started out getting in touch with them world of golf shirts. However the thoughts &#34;&#60;a href=&#34;http://www.clearance-polo-shirts.com&#34; title=&#34;polo ralph lauren outlet online &#34;&#62;polo ralph lauren outlet online &#60;/a&#62; &#34; in addition to &#34;golf shirt&#34; are used interchangeably, the word &#34;polo shirt&#34; is actually more popular. Embroidered &#60;a href=&#34;http://www.clearance-polo-shirts.com&#34; title=&#34;hollister outlet online&#34;&#62;hollister outlet online&#60;/a&#62; tend to be used with regard to organization, casual in addition to recreational activities&#60;a href=&#34;http://www.clearance-polo-shirts.com&#34;&#62;http://www.clearance-polo-shirts.com&#60;/a&#62;.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>thepaul on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1824</link>
			<pubDate>Wed, 02 May 2012 19:31:20 +0000</pubDate>
			<dc:creator>thepaul</dc:creator>
			<guid isPermaLink="false">1824@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Confirmed, there's a bug here in the CQL3 parser- it doesn't treat the * right.  Use &#34;count(1)&#34; instead for now; it is precisely equivalent. This is fixed in &#60;a href=&#34;https://issues.apache.org/jira/browse/CASSANDRA-4185&#34; rel=&#34;nofollow&#34;&#62;https://issues.apache.org/jira/browse/CASSANDRA-4185&#60;/a&#62; .
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1816</link>
			<pubDate>Tue, 01 May 2012 20:56:43 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1816@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;[cqlsh 2.2.0 &#124; Cassandra 1.1.0 &#124; CQL spec 3.0.0 &#124; Thrift protocol 19.30.0]&#60;br /&#62;
Use HELP for help.&#60;/p&#62;
&#60;p&#62;cqlsh&#38;gt; use demo;&#60;/p&#62;
&#60;p&#62;drop COLUMNFAMILY isbn_price_v3k3;&#60;/p&#62;
&#60;p&#62;CREATE COLUMNFAMILY isbn_price_v3k3&#60;br /&#62;
(isbn varchar,&#60;br /&#62;
 price float,&#60;br /&#62;
 listing_id int,&#60;br /&#62;
 qty int,&#60;br /&#62;
 obj varchar,&#60;br /&#62;
 PRIMARY KEY (isbn, price, listing_id)&#60;br /&#62;
);&#60;/p&#62;
&#60;p&#62;insert into isbn_price_v3k3(isbn, price, listing_id, obj) values ('111222333444',1.2,1001,'axxxxxxxxx');&#60;br /&#62;
insert into isbn_price_v3k3(isbn, price, listing_id, obj) values ('111222333444',1.2,1002,'axxxxxxxxx');&#60;br /&#62;
insert into isbn_price_v3k3(isbn, price, listing_id, obj) values ('111222333444',1.2,1003,'axxxxxxxxx');&#60;br /&#62;
insert into isbn_price_v3k3(isbn, price, listing_id, obj) values ('111222333444',5.5,1004,'axxxxxxxxx');&#60;br /&#62;
insert into isbn_price_v3k3(isbn, price, listing_id, obj) values ('111222333444',5.5,1005,'axxxxxxxxx');&#60;br /&#62;
insert into isbn_price_v3k3(isbn, price, listing_id, obj) values ('111222333444',1.2, 995,'axxxxxxxxx');&#60;br /&#62;
insert into isbn_price_v3k3(isbn, price, listing_id, obj) values ('111222333444',5.5, 978,'bxxxxxxxxx');&#60;/p&#62;
&#60;p&#62;cqlsh:demo&#38;gt; SELECT isbn, price FROM isbn_price_v3 where isbn='111222333444';&#60;br /&#62;
 isbn         &#124; price&#60;br /&#62;
--------------+-------&#60;br /&#62;
 111222333444 &#124;   2.2&#60;br /&#62;
 111222333444 &#124;   3.4&#60;br /&#62;
 111222333444 &#124;   5.5&#60;br /&#62;
 111222333444 &#124;   7.1&#60;br /&#62;
 111222333444 &#124;   7.2&#60;br /&#62;
 111222333444 &#124;   7.3&#60;br /&#62;
 111222333444 &#124;   9.8&#60;/p&#62;
&#60;p&#62;cqlsh:demo&#38;gt; SELECT count(*) FROM isbn_price_v3 where isbn='111222333444';&#60;br /&#62;
Bad Request: Only COUNT(*) and COUNT(1) operations are currently supported.&#60;br /&#62;
cqlsh:demo&#38;gt; SELECT count(1) FROM isbn_price_v3 where isbn='111222333444';&#60;br /&#62;
 count&#60;br /&#62;
-------&#60;br /&#62;
     1&#60;/p&#62;
&#60;p&#62;It still didn't work.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Charlie&#124;DBA
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1815</link>
			<pubDate>Tue, 01 May 2012 20:51:30 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1815@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;It didn't work on my local CQL 3.0.&#60;/p&#62;
&#60;p&#62;FYI,&#60;/p&#62;
&#60;p&#62;$&#38;gt;cqlsh --cql3&#60;br /&#62;
Connected to MyCluster at xxx:9160.&#60;br /&#62;
[cqlsh 2.2.0 &#124; Cassandra 1.1.0 &#124; CQL spec 3.0.0 &#124; Thrift protocol 19.30.0]&#60;br /&#62;
Use HELP for help.&#60;br /&#62;
cqlsh&#38;gt; use demo;&#60;br /&#62;
cqlsh:demo&#38;gt; SELECT count(*) FROM demo.c1 where id=1;&#60;br /&#62;
Bad Request: Only COUNT(*) and COUNT(1) operations are currently supported.&#60;/p&#62;
&#60;p&#62;cqlsh:demo&#38;gt; SELECT count(1) FROM demo.c1 where id=1;&#60;br /&#62;
 count&#60;br /&#62;
-------&#60;br /&#62;
     1&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Charlie &#124; DBA
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1338</link>
			<pubDate>Thu, 08 Mar 2012 18:01:18 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1338@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Sure. I'll test it after CQL3.0 is released.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jbellis on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1335</link>
			<pubDate>Thu, 08 Mar 2012 05:00:23 +0000</pubDate>
			<dc:creator>jbellis</dc:creator>
			<guid isPermaLink="false">1335@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Like I said, you need to declare a composite PK for this, which is only supported in 1.1.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1334</link>
			<pubDate>Wed, 07 Mar 2012 23:48:33 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1334@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Hi Jonathan Ellis and Nickmbailey,&#60;/p&#62;
&#60;p&#62;Thanks for the reply. I'll try composite PK on Cassandra 1.1 later.&#60;/p&#62;
&#60;p&#62;FYI,&#60;/p&#62;
&#60;p&#62;It doesn't work on Cassandra 1.0.7.  ;)&#60;/p&#62;
&#60;p&#62;/home/cassandra&#38;gt;cqlsh&#60;/p&#62;
&#60;p&#62;Connected to Test Cluster at localhost:9160.&#60;br /&#62;
[cqlsh 2.0.0 &#124; Cassandra 1.0.7 &#124; CQL spec 2.0.0 &#124; Thrift protocol 19.20.0]&#60;br /&#62;
Use HELP for help.&#60;br /&#62;
cqlsh&#38;gt;&#60;br /&#62;
cqlsh&#38;gt; CREATE KEYSPACE demo with strategy_class = 'SimpleStrategy' and strategy_options:replication_factor=1;&#60;/p&#62;
&#60;p&#62;cqlsh&#38;gt; use demo;&#60;/p&#62;
&#60;p&#62;cqlsh:demo&#38;gt; CREATE COLUMNFAMILY c1 (id int PRIMARY KEY)&#60;br /&#62;
        ... WITH comparator=varchar AND default_validation=int;&#60;/p&#62;
&#60;p&#62;cqlsh:demo&#38;gt; update c1 set a01 =1 where id = 1;&#60;br /&#62;
cqlsh:demo&#38;gt; update c1 set a02 =1 where id = 1;&#60;br /&#62;
cqlsh:demo&#38;gt; update c1 set a03 =1 where id = 1;&#60;br /&#62;
cqlsh:demo&#38;gt; update c1 set a04 =1 where id = 1;&#60;br /&#62;
cqlsh:demo&#38;gt; update c1 set a05 =1 where id = 1;&#60;br /&#62;
cqlsh:demo&#38;gt; update c1 set a06 =1 where id = 1;&#60;br /&#62;
cqlsh:demo&#38;gt; update c1 set a07 =1 where id = 1;&#60;br /&#62;
cqlsh:demo&#38;gt; update c1 set a08 =1 where id = 1;&#60;br /&#62;
cqlsh:demo&#38;gt; update c1 set a09 =1 where id = 1;&#60;br /&#62;
...&#60;br /&#62;
cqlsh:demo&#38;gt; update c1 set a25 =1 where id = 1;&#60;br /&#62;
cqlsh:demo&#38;gt;&#60;br /&#62;
cqlsh:demo&#38;gt;&#60;/p&#62;
&#60;p&#62;cqlsh:demo&#38;gt; SELECT count(*) FROM demo.c1 where id=1;&#60;br /&#62;
 count &#124;&#60;br /&#62;
     1 &#124;&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Charlie &#124; DBA
&#60;/p&#62;</description>
		</item>
		<item>
			<title>jbellis on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1328</link>
			<pubDate>Wed, 07 Mar 2012 18:29:37 +0000</pubDate>
			<dc:creator>jbellis</dc:creator>
			<guid isPermaLink="false">1328@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;That's correct, but to elaborate, you would need to define a composite PK on that columnfamily and then use the *partition key* in the WHERE clause.  See &#60;a href=&#34;http://www.datastax.com/dev/blog/schema-in-cassandra-1-1&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/dev/blog/schema-in-cassandra-1-1&#60;/a&#62; for an explanation.&#60;/p&#62;
&#60;p&#62;Composite PK is only supported in Cassandra 1.1.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>nickmbailey on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1327</link>
			<pubDate>Wed, 07 Mar 2012 16:42:12 +0000</pubDate>
			<dc:creator>nickmbailey</dc:creator>
			<guid isPermaLink="false">1327@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;&#60;a href=&#34;http://www.datastax.com/docs/1.0/references/cql/SELECT&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/docs/1.0/references/cql/SELECT&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You should be able to do:&#60;/p&#62;
&#60;p&#62;SELECT count(*) FROM &#38;lt;keyspace&#38;gt;.&#38;lt;columnfamily&#38;gt; WHERE KEY = &#38;lt;key&#38;gt;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Can I get number of columns by rowkey in CQL?"</title>
			<link>http://www.datastax.com/support-forums/topic/can-i-get-number-of-columns-by-rowkey-in-cql#post-1310</link>
			<pubDate>Tue, 06 Mar 2012 19:14:46 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1310@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;E.g. like get_count(key) in pycassa.&#60;/p&#62;
&#60;p&#62;Or, when will this be implemented in CQL?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
Charlie &#124; DBA
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
