Is it possible to create a table that has a default TTL for all rows that are inserted into it, or do you have to always remember to set the TTL when you do an insert/update?
Cant see anything on this in the documentation:
http://www.datastax.com/documentation/cql/3.0/cql/cql_reference/create_table_r.html
Yes it is possible to set TTL for the entire column family.
CREATE TABLE test_table (
# your table definition #
) WITH default_time_to_live = 10;
Inserted rows then disappear after 10 seconds.
I believe the work was done for it here:
https://issues.apache.org/jira/browse/CASSANDRA-3974
Here's a docs reference sent by Patrick McFadin of DataStax (@PatrickMcFadin):
http://docs.datastax.com/en/cql/3.1/cql/cql_reference/tabProp.html
Cheers,