I have a CQL table defined like this:
CREATE table primary_key_only(
row_key varchar,
clustered_key varchar,
primary key(row_key, clustered_key)
)
Assuming I insert values like this:
INSERT INTO primary_key_only (row_key, clustered_key) VALUES ('FACE', 'D00D') USING TTL 86400;
How would I go about retrieving the TTL for the inserted data? Normally, if there was a CQL column that wasn't part of the primary key, then I could use a statement like:
SELECT ttl(<column_name>) FROM table WHERE row_key='key';
But since there are only primary key columns, functions like ttl
and writetime
won't work. How can I obtain the TTL, beyond adding an additional "dummy" column to the table that is not part of the primary key?
clustered_key
, but the actual value will be empty. – Platinize