"DESCRIBE" is a cqlsh feature, not a part of the CQL language.

On Wed, Apr 10, 2013 at 2:37 AM, Kuldeep Mishra <kuld.cs.mis...@gmail.com>wrote:

> Hi ,
>     I am trying to execute following query but not working and throwing
> exception
>
> QUERY:--
>      Cassandra.Client client;
>      client.execute_cql3_query(ByteBuffer.wrap("describe keyspace
> mykeyspace".getBytes(Constants.CHARSET_UTF8)),   Compression.NONE,
> ConsistencyLevel.ONE);
>
>      client.execute_cql3_query(ByteBuffer.wrap("describe table
> mytable".getBytes(Constants.CHARSET_UTF8)),   Compression.NONE,
> ConsistencyLevel.ONE);
>
> but both query giving following exception,
>
> STACK TRACE
>
> InvalidRequestException(why:line 1:0 no viable alternative at input
> 'describe')
>     at
> org.apache.cassandra.thrift.Cassandra$execute_cql3_query_result.read(Cassandra.java:37849)
>     at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
>     at
> org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql3_query(Cassandra.java:1562)
>     at
> org.apache.cassandra.thrift.Cassandra$Client.execute_cql3_query(Cassandra.java:1547)
>
> Please help..
>
>
> Thanks and Regards
> Kuldeep
>
>
>
>
>
>
> --
> Thanks and Regards
> Kuldeep Kumar Mishra
> +919540965199
>



-- 
Tyler Hobbs
DataStax <http://datastax.com/>

Reply via email to