/

Table Properties

Managing Cassandra Tables 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 NameCassandra Property NameData Type
bloomFilterFPChancebloom_filter_fp_chanceYAML string
cachingcachingMap
commentcommentYAML String
compactioncompactionMap
compressioncompressionMap
crcCheckChancecrc_check_chanceYAML string
dcLocalReadRepairChancedclocal_read_repair_chanceYAML string
defaultTTLdefault_time_to_liveInteger
gcGraceSecondsgc_grace_period_secondsInteger
maxIndexIntervalmax_index_intervalInteger
memtableFlushPeriodMsmemtable_flush_period_in_msInteger
minIndexIntervalmin_index_intervalInteger
readRepairChangeread_repair_changeYAML String
speculativeRetryspeculative_retryYAML String
Edit on GitHub