You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Andrew Cobley <a....@dundee.ac.uk> on 2014/02/06 22:01:51 UTC

CQL list command

TL;DR

Is there a CQL equivalent of the CLI List command ?  yes or No?

Long version

I often use the CLI command LIST for debugging or when teaching students showing them what’s going on under the hood of CQL.  I see that CLI swill be removed in Cassandra 3 and we will lose this ability.  It would be nice if CQL retained it, or something like it for debugging and etching purposes.

Any ideas ?
Andy



The University of Dundee is a registered Scottish Charity, No: SC015096

Re: CQL list command

Posted by Russell Bradberry <rb...@gmail.com>.
try SELECT * FROM my_table LIMIT 100;



On February 6, 2014 at 4:02:26 PM, Andrew Cobley (a.e.cobley@dundee.ac.uk) wrote:

TL;DR  

Is there a CQL equivalent of the CLI List command ? yes or No?  

Long version  

I often use the CLI command LIST for debugging or when teaching students showing them what’s going on under the hood of CQL. I see that CLI swill be removed in Cassandra 3 and we will lose this ability. It would be nice if CQL retained it, or something like it for debugging and etching purposes.  

Any ideas ?  
Andy  



The University of Dundee is a registered Scottish Charity, No: SC015096  

Re: CQL list command

Posted by Brian O'Neill <bo...@alumni.brown.edu>.
+1, agreed.  I do the same thing.

If cli is going away, we¹ll need this ability in cqlsh.

I created a JIRA issue for it:
https://issues.apache.org/jira/browse/CASSANDRA-6676


We¹ll see what the crew come back with.

-brian

---
Brian O'Neill
Chief Technology Officer

Health Market Science
The Science of Better Results
2700 Horizon Drive € King of Prussia, PA € 19406
M: 215.588.6024 € @boneill42 <http://www.twitter.com/boneill42>  €
healthmarketscience.com

This information transmitted in this email message is for the intended
recipient only and may contain confidential and/or privileged material. If
you received this email in error and are not the intended recipient, or
the person responsible to deliver it to the intended recipient, please
contact the sender at the email above and delete this email and any
attachments and destroy any copies thereof. Any review, retransmission,
dissemination, copying or other use of, or taking any action in reliance
upon, this information by persons or entities other than the intended
recipient is strictly prohibited.
 






On 2/7/14, 2:33 AM, "Ben Hood" <0x...@gmail.com> wrote:

>On Thu, Feb 6, 2014 at 9:01 PM, Andrew Cobley <a....@dundee.ac.uk>
>wrote:
>> I often use the CLI command LIST for debugging or when teaching
>>students showing them what's going on under the hood of CQL.  I see that
>>CLI swill be removed in Cassandra 3 and we will lose this ability.  It
>>would be nice if CQL retained it, or something like it for debugging and
>>etching purposes.
>
>I agree. I use LIST every now and then to verify the storage layout of
>partitioning and cluster columns. What would be cool is to do
>something like:
>
>cqlsh:y> CREATE TABLE x (
>          ...     a int,
>          ...     b int,
>          ...     c int,
>          ...     PRIMARY KEY (a,b)
>          ... );
>cqlsh:y> insert into x (a,b,c) values (1,1,1);
>cqlsh:y> insert into x (a,b,c) values (2,1,1);
>cqlsh:y> insert into x (a,b,c) values (2,2,1);
>cqlsh:y> select * from x;
> a | b | c
>---+---+---
> 1 | 1 | 1
> 2 | 1 | 1
> 2 | 2 | 1
>
>(3 rows)
>
>cqlsh:y> select * from x show storage; // requires monospace font
>
>           +---+
>+---+      |b:1|
>|a:1| +--> |---|
>+---+      |c:1|
>           +---+
>
>           +---+---+
>+---+      |b:1|b:2|
>|a:2| +--> |---|---|
>+---+      |c:1|c:2|
>           +---+---+
>
>(2 rows)



Re: CQL list command

Posted by Ben Hood <0x...@gmail.com>.
On Thu, Feb 6, 2014 at 9:01 PM, Andrew Cobley <a....@dundee.ac.uk> wrote:
> I often use the CLI command LIST for debugging or when teaching students showing them what's going on under the hood of CQL.  I see that CLI swill be removed in Cassandra 3 and we will lose this ability.  It would be nice if CQL retained it, or something like it for debugging and etching purposes.

I agree. I use LIST every now and then to verify the storage layout of
partitioning and cluster columns. What would be cool is to do
something like:

cqlsh:y> CREATE TABLE x (
          ...     a int,
          ...     b int,
          ...     c int,
          ...     PRIMARY KEY (a,b)
          ... );
cqlsh:y> insert into x (a,b,c) values (1,1,1);
cqlsh:y> insert into x (a,b,c) values (2,1,1);
cqlsh:y> insert into x (a,b,c) values (2,2,1);
cqlsh:y> select * from x;
 a | b | c
---+---+---
 1 | 1 | 1
 2 | 1 | 1
 2 | 2 | 1

(3 rows)

cqlsh:y> select * from x show storage; // requires monospace font

           +---+
+---+      |b:1|
|a:1| +--> |---|
+---+      |c:1|
           +---+

           +---+---+
+---+      |b:1|b:2|
|a:2| +--> |---|---|
+---+      |c:1|c:2|
           +---+---+

(2 rows)