Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to drop schema containing tables in base using phoenix

Highlighted

How to drop schema containing tables in base using phoenix

New Contributor

HBase version :1.2.6

Phoenix Version : 4.10.0-Hbase-1.2.0

I am trying to drop schema but unable to do it.

It is throwing error that : schema is not empty.

But how to drop the schema in that case ??

What extra we need to do ?

Below is the java code using phoenix to drop schema from hbase :

Connection conn = setupDbConnection();
statement = conn.createStatement();
statement.executeUpdate("DROP SCHEMA "+schemaName);
onn.commit();
1 REPLY 1
Highlighted

Re: How to drop schema containing tables in base using phoenix

Explorer

There is no automated way to do this. You'll have to enumerate all the tables and drop them one by one. Maybe it'll be cool if we have a CASCADE drop option, but it's not there yet.

Don't have an account?
Coming from Hortonworks? Activate your account here