Skip to main content
Notice removed Reward existing answer by Naman
Bounty Ended with Gyanendra Dwivedi's answer chosen by Naman
Notice added Reward existing answer by Naman
Bounty Started worth 150 reputation by Naman
edited tags
Link
Naman
  • 32.7k
  • 32
  • 240
  • 385
Notice removed Reward existing answer by Naman
Bounty Ended with Gyanendra Dwivedi's answer chosen by Naman
Notice added Reward existing answer by Naman
Bounty Started worth 50 reputation by Naman
Adding more tag
Link
Gyanendra Dwivedi
  • 5.6k
  • 3
  • 30
  • 54
Source Link
Gyanendra Dwivedi
  • 5.6k
  • 3
  • 30
  • 54

HBase: Create table with same schema as existing table

I tried searching on the forum, where I can create a new empty hbase table from existing hbase table schema, but not able to find.

To be more precise, suppose I have a table with multiple column families and many column qualifier within those families.

Now I have to create another empty table with the same schema. Do we any way to create table like we do in RDBMS.

Create table new_table as select * from existing_table where 1=2; 

The existing table has a complex structure, so normal hbase create table command with column family and column qualifier specified is not an option.

FYI.. I am using Mapr HBase 0.98.12-mapr-1506 and I do not have option to switch to any advance version or another distribution.