phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ankit Singhal <>
Subject Re: [Phoenix 4.4]Rename table Supported ?
Date Mon, 09 May 2016 07:07:08 GMT
Hi Divya,

Currently there is no sql construct but you can do it by following below
steps.(It is highly recommended you try these steps in dev environment
before proceeding to production.

1. Take snapshot of the original table from hbase shell and restore it with
another table name.

hbase> disable 'oldtablename'

hbase> snapshot 'oldtablename', 'oldtablename_Snapshot'

hbase> clone_snapshot 'oldtablename_Snapshot', 'newTableName'

2. Open phoenix connection at timestamp 1 day less than the oldest data in
your tables ( by specifying ts in CurrentSCN ./
"localhost;CurrentSCN=<ts>") and create table with the exact DDL used for
old table but with the table name changed to new table.

3. confirm that your new table is working fine as expected .
4. Then drop the old table from phoenix and snapshot from hbase shell.

hbase> delete_snapshot 'oldtablename_Snapshot'

Ankit Singhal

On Mon, May 9, 2016 at 8:08 AM, Divya Gehlot <>

> Hi,
> Does Phoenix Support renaming of table ?
> Is yes, Please help me with the syntax.
> Thanks,
> Divya

View raw message