Support Questions

Find answers, ask questions, and share your expertise

Rename the HBase column family without losing the data.

I would like to rename the existing hbase column family. I have tried using the alter delete and create where the data in the old column family got deleted. Is there any way where we can rename the coulmn family.


No, you cannot "rename" a column family in one atomic operation. To "rename", you must rewrite the data with the new column family. Then, you can simply drop the old column family.

@Josh Elser Could you please let me know what do you mean by "rewrite the data with the new column family"? You mean to create a new table and copy the current hbase data to new hbase table and drop the old table?

You do not need to create a new table. You can use the existing table if you alter it to add the new column family.

"rewrit[ing] the data" means that you must read all data and write it again using the new column family. Whether you read it from HBase or from its original form is of no consequence.