how to change TTL of hbase table from phoenix

Viewed 1318

I am able to give TTL of an HBase table at table creation time. How to change the TTL of the table after creation. Is it possible to change the TTL at runtime with out disabling the table? Thanks in advance :)

Using Hortonworks 2.6 HDP Phoenix Version 4.7 HBase Version 1.2.1

2 Answers
ALTER TABLE <table_name> SET TTL=<value in secs>

You can execute create if not exists DDL again with a different TTL value. For example:

create table if not exists TEST_TABLE (...) TTL=86400

Or remove TTL:

create table if not exists TEST_TABLE (...) TTL=NULL
Related