Commenting out Cassandra keyspace, table, column
Oracle has the ability to add a comment about a table, view, materialized view, or column to the data dictionary, for example
COMMENT ON COLUMN employees.job_id
IS 'abbreviated job title';
I found this especially useful as a tester when trying to understand the ideas behind names, which are not necessarily self-evident in large databases (over 200 tables).
Is there such a possibility in Kassandra?
+3
source to share
1 answer
You can use the "with comments" option
cqlsh:d2>
cqlsh:d2> create table employee (id int primary key, name text) with comment = 'Employee id and name';
cqlsh:d2> desc table employee;
CREATE TABLE d2.employee (
id int PRIMARY KEY,
name text
) WITH bloom_filter_fp_chance = 0.01
AND caching = '{"keys":"ALL", "rows_per_partition":"NONE"}'
AND comment = 'Employee id and name'
AND compaction = {'min_threshold': '4', 'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32'}
AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND dclocal_read_repair_chance = 0.1
AND default_time_to_live = 0
AND gc_grace_seconds = 864000
AND max_index_interval = 2048
AND memtable_flush_period_in_ms = 0
AND min_index_interval = 128
AND read_repair_chance = 0.0
AND speculative_retry = '99.0PERCENTILE';
+6
source to share