如何列出Cassandra中列族的所有列名? [英] How to list all column names in a column family in Cassandra?
本文介绍了如何列出Cassandra中列族的所有列名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Cassandra,我想要一个数据浏览器显示任何列族的内容。我需要获取列名称来配置UI网格。
解决方案
最好的方法,如果你使用Cassandra 1.1: / p>
SELECT column_name FROM system.schema_columnfamilies WHERE keyspace_name = X AND columnfamily_name = Y
pre>
另请参见 http: //www.datastax.com/dev/blog/schema-in-cassandra-1-1
I'm using Cassandra, and I want to make a data browser which shows the contents of any column family. I need to get the column names to configure a UI grid. Is it possible to collect the names of columns in all rows?
解决方案The best way, if you are using Cassandra 1.1:
SELECT column_name FROM system.schema_columnfamilies WHERE keyspace_name = X AND columnfamily_name = Y
See also http://www.datastax.com/dev/blog/schema-in-cassandra-1-1
这篇关于如何列出Cassandra中列族的所有列名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文