Question

Am trying to get the column names of my column family which are created dynamically.

I created the 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'};

I inserted some data into it with the column names but now how to see my column names?

Was it helpful?

Solution

You have to query row by row to see any column names that aren't declared (by you) in the column metadata. If you want to add columns to the column metadata then you need to alter the column family definition. Cassandra will not automatically do this for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top