我试图获取动态创建的列族的列名。
我创建了CF
[default@test] CREATE COLUMN FAMILY blog_entry
WITH comparator = TimeUUIDType
AND key_validation_class=UTF8Type
AND default_validation_class = UTF8Type;
[default@test] show schema;
create column family blog_entry
with column_type = 'Standard'
and comparator = 'TimeUUIDType'
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type'
and read_repair_chance = 0.1
and dclocal_read_repair_chance = 0.0
and populate_io_cache_on_flush = false
and gc_grace = 864000
and min_compaction_threshold = 4
and max_compaction_threshold = 32
and replicate_on_write = true
and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
and caching = 'KEYS_ONLY'
and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor'};
我使用列名将一些数据插入其中,但现在如何查看我的列名?
答案 0 :(得分:3)
您必须逐行查询以查看列元数据中未声明的任何列名(由您)。如果要向列元数据添加列,则需要更改列族定义。 Cassandra不会自动为你做这件事。