Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (2)
avatar

PROBLEM: Created a Phoenix Table on top of existing Hbase table, the phoenix table is not working as expected or is not needed now, need to delete Phoenix table but not the existing Hbase table as it has valid data.

CONSTRAINT : Simple dropping of table from Phoenix shell would delete Hbase table too.

SOLUTION :

Step 1: Delete Phoenix table entry from SYSTEM.CATALOG as follows :

delete from SYSTEM.CATALOG where TABLE_NAME='table_name';

Step 2 : Restart the region server which hosts SYSTEM.CATALOG to clear metadata cache which may still not allow creating same named table from Phoenix.

Note : This approach may not work well if there are indexes or views on top of this table as we would end up corrupting catalog table.

You may also try snapshotting existing Hbase table , dropping the table completely from Phoenix and then cloning / restoring the Hbase table from snapshot.

10,253 Views
0 Kudos
Comments
avatar
Super Collaborator

Hi @gsharma please reflect the title

How to delete a Phoenix Table (created on Top of Existing Hbase table), Without Dropping HBase Table
Version history
Last update:
‎02-14-2018 11:01 PM
Updated by:
Contributors