Table attributes

Attributes per table.

The following attributes can be declared per table.

bloom_filter_fp_chance 
See CQL properties in CQL for Cassandra 2.x.
bucket_high 
See CQL Compaction Subproperties in CQL for Cassandra 2.x.
bucket_low 
See CQL Compaction Subproperties in CQL for Cassandra 2.x.
caching 
See CQL properties in CQL for Cassandra 2.x.
chunk_length_kb 
See CQLCompression Subproperties in CQL for Cassandra 2.x.
column_metadata 
(Default: N/A - container attribute) Column metadata defines these attributes of a column:
  • name: Binds a validation_class and (optionally) an index to a column.
  • validation_class: Type used to check the column value.
  • index_name: Name of the index.
  • index_type: Type of index. Currently the only supported value is KEYS.

Setting a value for the name option is required. The validation_class is set to the default_validation_class of the table if you do not set the validation_class option explicitly. The value of index_type must be set to create an index for a column. The value of index_name is not valid unless index_type is also set.

Setting and updating column metadata with the Cassandra-CLI utility requires a slightly different command syntax than other attributes; note the brackets and curly braces in this example:

[default@demo ] UPDATE COLUMN FAMILY users WITH  comparator =UTF8Type
AND  column_metadata =[{column_name: full_name, validation_class: UTF8Type, index_type: KEYS }];
column_type 
(Default: Standard) The standard type of table contains regular columns.
comment 
See CQL properties in CQL for Cassandra 2.x.
compaction_strategy 
See compaction in CQL properties in CQL for Cassandra 2.x.
compaction_strategy_options 
(Default: N/A - container attribute) Sets attributes related to the chosen compaction-strategy. Attributes are:
comparator 
(Default: BytesType) Defines the data types used to validate and sort column names. There are several built-in column comparators available. The comparator cannot be changed after you create a table.
compression_options 
(Default: N/A - container attribute) Sets the compression algorithm and sub-properties for the table. Choices are:
  • sstable_compression
  • chunk_length_kb
  • crc_check_chance
crc_check_chance 
See CQLCompression Subproperties in CQL for Cassandra 2.x.
default_time_to_live 
See CQL properties in CQL for Cassandra 2.x.
default_validation_class 
(Default: N/A) Defines the data type used to validate column values. There are several built-in column validators available.
gc_grace 
See CQL properties in CQL for Cassandra 2.x.
index_interval 
See CQL properties in CQL for Cassandra 2.x.
key_validation_class 
(Default: N/A) Defines the data type used to validate row key values. There are several built-in key validators available, however CounterColumnType (distributed counters) cannot be used as a row key validator.
max_compaction_threshold 
See max_threshold in CQL Compaction Subproperties in CQL for Cassandra 2.x.
min_compaction_threshold 
See min_threshold in CQL Compaction Subproperties in CQL for Cassandra 2.x.
max_index_interval 
See CQL properties in CQL for Cassandra 2.x.
min_index_interval 
See CQL properties in CQL for Cassandra 2.x.
memtable_flush_after_mins 
Deprecated as of Cassandra 1.0, but can still be declared for backward compatibility. Use commitlog_total_space_in_mb.
memtable_flush_period_in_ms 
See CQL properties in CQL for Cassandra 2.x.
memtable_operations_in_millions 
Deprecated as of Cassandra 1.0, but can still be declared for backward compatibility. Use commitlog_total_space_in_mb.
memtable_throughput_in_mb 
Deprecated as of Cassandra 1.0, but can still be declared for backward compatibility. Use commitlog_total_space_in_mb.
min_sstable_size 
See CQL Compaction Subproperties in CQL for Cassandra 2.x.
name 
(Default: N/A) Required. The user-defined name of the table.
read_repair_chance 
See CQL properties in CQL for Cassandra 2.x.
speculative_retry 
See CQL properties in CQL for Cassandra 2.x.
sstable_size_in_mb 
See CQL Compaction Subproperties in CQL for Cassandra 2.x.
sstable_compression 
See compression in CQL properties in CQL for Cassandra 2.x.
tombstone_compaction_interval 
See CQL Compaction Subproperties in CQL for Cassandra 2.x.
tombstone_threshold 
See CQL Compaction Subproperties in CQL for Cassandra 2.x.