Changing Table Proper

9 views
Skip to first unread message

Alex Thurston

unread,
Oct 22, 2014, 2:46:16 PM10/22/14
to ceq...@googlegroups.com
How does one change a table's properties?  When tables are created after running `rake cequel:migrate`, their configuration appears as follows:

CREATE TABLE foo (
  id uuid
,
  name text
,
  PRIMARY KEY
((id))
) WITH
  bloom_filter_fp_chance
=0.010000 AND
  caching
='KEYS_ONLY' AND
  comment
='' AND
  dclocal_read_repair_chance
=0.100000 AND
  gc_grace_seconds
=864000 AND
  index_interval
=128 AND
  read_repair_chance
=0.000000 AND
  replicate_on_write
='true' AND
  populate_io_cache_on_flush
='false' AND
  default_time_to_live
=0 AND
  speculative_retry
='99.0PERCENTILE' AND
  memtable_flush_period_in_ms
=0 AND
  compaction
={'class': 'SizeTieredCompactionStrategy'} AND
  compression
={'sstable_compression': 'LZ4Compressor'};

I would like - for example - to change the compaction to LeveledCompactionStrategy.

TIA,
Alex

Matthew A. Brown

unread,
Oct 22, 2014, 5:09:53 PM10/22/14
to Alex Thurston, ceq...@googlegroups.com
Hi Alex,

You should be able to use a `table_property` declaration in the model definition—here's an example from the specs.

Let me know if that doesn't solve it!
Mat

--
You received this message because you are subscribed to the Google Groups "Cequel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cequel+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Thurston

unread,
Oct 22, 2014, 9:09:13 PM10/22/14
to ceq...@googlegroups.com, alt...@gmail.com
Bingo!  That did it.  Not sure why I didn't see that function call when I went through the specs trying to see if was done in there.  Sorry to waste your time and thanks very much.
Reply all
Reply to author
Forward
0 new messages