You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Rahul Gupta <rg...@dekaresearch.com> on 2013/07/23 20:51:19 UTC

Unable to describe table in CQL 3

I am using Cassandra ver 1.1.9.7
Created a Column Family using Cassandra-cli.

create column family events
with comparator = 'CompositeType(DateType,UTF8Type)'
and key_validation_class = 'UUIDType'
and default_validation_class = 'UTF8Type';

I can describe this CF using CQL2 but getting error when trying the same describe with CQL 3

cqlsh:CQI> desc table events;

/usr/lib/python2.6/site-packages/cqlshlib/cql3handling.py:852: UnexpectedTableStructure: Unexpected table structure; may not translate correctly to CQL. expected composite key CF to have column aliases, but found none
/usr/lib/python2.6/site-packages/cqlshlib/cql3handling.py:875: UnexpectedTableStructure: Unexpected table structure; may not translate correctly to CQL. expected [u'KEY'] length to be 2, but it's 1. comparator='org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.UTF8Type)'
CREATE TABLE events (
  "KEY" uuid PRIMARY KEY
) WITH
  comment='' AND
  caching='KEYS_ONLY' AND
  read_repair_chance=0.100000 AND
  gc_grace_seconds=864000 AND
  replicate_on_write='true' AND
  compaction_strategy_class='SizeTieredCompactionStrategy' AND
  compression_parameters:sstable_compression='SnappyCompressor';

Any ideas why CQL3 won't display Composite columns? What should be done to make them compatible?

Thanks,
Rahul Gupta
DEKA Research & Development<http://www.dekaresearch.com/>
340 Commercial St  Manchester, NH  03101
P: 603.666.3908 extn. 6504 | C: 603.718.9676

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.


________________________________
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

Re: Unable to describe table in CQL 3

Posted by Shahab Yunus <sh...@gmail.com>.
Rahul,

See this as it was discussed earlier:
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Representation-of-dynamically-added-columns-in-table-column-family-schema-using-cqlsh-td7588997.html

Regards,
Shahab


On Tue, Jul 23, 2013 at 2:51 PM, Rahul Gupta <rg...@dekaresearch.com>wrote:

>  I am using Cassandra ver 1.1.9.7****
>
> Created a Column Family using Cassandra-cli.****
>
> ** **
>
> create column family events****
>
> with comparator = 'CompositeType(DateType,UTF8Type)'****
>
> and key_validation_class = 'UUIDType'****
>
> and default_validation_class = 'UTF8Type';****
>
> ** **
>
> I can describe this CF using CQL2 but getting error when trying the same
> describe with CQL 3****
>
> ** **
>
> cqlsh:CQI> desc table events;****
>
> ** **
>
> /usr/lib/python2.6/site-packages/cqlshlib/cql3handling.py:852:
> UnexpectedTableStructure: Unexpected table structure; may not translate
> correctly to CQL. expected composite key CF to have column aliases, but
> found none****
>
> /usr/lib/python2.6/site-packages/cqlshlib/cql3handling.py:875:
> UnexpectedTableStructure: Unexpected table structure; may not translate
> correctly to CQL. expected [u'KEY'] length to be 2, but it's 1.
> comparator='org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.DateType,org.apache.cassandra.db.marshal.UTF8Type)'
> ****
>
> CREATE TABLE events (****
>
>   "KEY" uuid PRIMARY KEY****
>
> ) WITH****
>
>   comment='' AND****
>
>   caching='KEYS_ONLY' AND****
>
>   read_repair_chance=0.100000 AND****
>
>   gc_grace_seconds=864000 AND****
>
>   replicate_on_write='true' AND****
>
>   compaction_strategy_class='SizeTieredCompactionStrategy' AND****
>
>   compression_parameters:sstable_compression='SnappyCompressor';****
>
> ** **
>
> Any ideas why CQL3 won’t display Composite columns? What should be done to
> make them compatible?****
>
> ** **
>
> Thanks,****
>
> *Rahul Gupta*
> *DEKA* *Research & Development* <http://www.dekaresearch.com/>****
>
> 340 Commercial St  Manchester, NH  03101****
>
> P: 603.666.3908 extn. 6504 | C: 603.718.9676****
>
> ** **
>
> This e-mail and the information, including any attachments, it contains
> are intended to be a confidential communication only to the person or
> entity to whom it is addressed and may contain information that is
> privileged. If the reader of this message is not the intended recipient,
> you are hereby notified that any dissemination, distribution or copying of
> this communication is strictly prohibited. If you have received this
> communication in error, please immediately notify the sender and destroy
> the original message.****
>
> ** **
>
> ------------------------------
> This e-mail and the information, including any attachments, it contains
> are intended to be a confidential communication only to the person or
> entity to whom it is addressed and may contain information that is
> privileged. If the reader of this message is not the intended recipient,
> you are hereby notified that any dissemination, distribution or copying of
> this communication is strictly prohibited. If you have received this
> communication in error, please immediately notify the sender and destroy
> the original message.
>
> Thank you.
>
> Please consider the environment before printing this email.
>