Table Properties
SchemaHero can manage (create and update) the properties of a Cassandra table.
When defining a table property in YAML, use the camelCase representation of the property name (bloomFilterFPChance
vs bloom_filter_fp_chance
).
In addition, make sure to put quotes around string types.
For map types, the keys are snake_case, and are passed directly through to Cassandra.
Example
apiVersion: schemas.schemahero.io/v1alpha4
kind: Table
metdata:
name: users-table
database: my-cassandra-database-object
name: users
schema:
cassandra:
primaryKey:
- [id]
columns:
- name: id
type: int
- name: login
type: varchar
properties:
bloomFilterFPChance: "0.01"
caching:
keys: NONE
rows_per_partition': '10'
comment: "test"
compaction:
class: 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
max_threshold: '32'
min_threshold': '4'
compression:
chunk_length_in_kb: '64'
class: 'org.apache.cassandra.io.compress.LZ4Compressor'
crcCheckChance: "1.0"
dcLocalReadRepairChance: "0.1"
defaultTTL: 0
gcGraceSeconds: 86400
maxIndexInterval: 2048
memtableFlushPeriodMs: 0
minIndexInterval: 128
readRepairChange: "0.0"
speculativeRetry: 99PERCENTILE
Supported Properties
The following properties are supported:
Property Name | Cassandra Property Name | Data Type |
---|---|---|
bloomFilterFPChance |
bloom_filter_fp_chance |
YAML string |
caching |
caching |
Map |
comment |
comment |
YAML String |
compaction |
compaction |
Map |
compression |
compression |
Map |
crcCheckChance |
crc_check_chance |
YAML string |
dcLocalReadRepairChance |
dclocal_read_repair_chance |
YAML string |
defaultTTL |
default_time_to_live |
Integer |
gcGraceSeconds |
gc_grace_period_seconds |
Integer |
maxIndexInterval |
max_index_interval |
Integer |
memtableFlushPeriodMs |
memtable_flush_period_in_ms |
Integer |
minIndexInterval |
min_index_interval |
Integer |
readRepairChange |
read_repair_change |
YAML String |
speculativeRetry |
speculative_retry |
YAML String |