You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Murali <mu...@gmail.com> on 2013/07/12 10:52:52 UTC
Extract meta-data using cql 3
Hi experts,
How to extract meta-data of a table or a keyspace using CQL 3.0?
--
Thanks,
Murali
Re: Extract meta-data using cql 3
Posted by Sylvain Lebresne <sy...@datastax.com>.
The "raw" answer is that you should query the system tables. The schema is
stored in the 3 following tables: System.schema_keyspaces,
System.schema_columnfamilies and System.schema_columns. Unfortunately, the
information stored in there is, for different reasons, not in a form that
makes
a lot of sense from a CQL3 point of view.
So in practice, you should probably rely on your client drivers that might
provide that same information but in a more usable way. For instance, with
cqlsh, you have a DESCRIBE command. Of if you say use the DataStax Java
driver,
you can access all those metadata through
cluster.getMetadata().getKeyspaces(),
etc...
On Fri, Jul 12, 2013 at 10:52 AM, Murali <mu...@gmail.com> wrote:
> Hi experts,
>
> How to extract meta-data of a table or a keyspace using CQL 3.0?
>
> --
> Thanks,
> Murali
>
>
Re: Extract meta-data using cql 3
Posted by Theo Hultberg <th...@iconara.net>.
there's a keyspace called system which has a few tables that contain the
metadata. for example schema_keyspaces that contain keyspace metadata, and
schema_columnfamilies that contain table metadata. there are more, just
fire up cqlsh and do a describe keyspace in the system keyspace to find
them.
T#
On Fri, Jul 12, 2013 at 10:52 AM, Murali <mu...@gmail.com> wrote:
> Hi experts,
>
> How to extract meta-data of a table or a keyspace using CQL 3.0?
>
> --
> Thanks,
> Murali
>
>