Reputation: 2083
To drop a column family, we have below commands.
hbase> disable tablename
hbase> alter 'tablename',{NAME=>'COLFAM NAME',METHOD=>'delete}
If there is a columnfamily: 'empdetails' in a table 'emptable' with columns: 'col1,col2', is there a way to delete a particular column from a column family ? Im not going to implement it but this is just for my knowledge and to know if there is such possibility.
Upvotes: 2
Views: 15494
Reputation: 2187
Refer this page it provides 3 solutions to delete a column from HBase table -
https://querydb.blogspot.com/2019/11/hbase-phoenix-cause-and-solution-for.html
Upvotes: 0
Reputation: 400
If I would have got your question right, you want to delete column qualifier(s) under a column family.
As we know, during table creation we would define only the column family not the column qualifier. So the column qualifier will be created on the fly and it depends on the need. Which means you won't be having a column qualifier for all rows in that table. So there is no provision to delete column qualifiers for a particular column family.
There is provision to delete a row by two ways:
May be you can refer this link for exact syntax
Upvotes: 3
Reputation: 681
delete '{table name}', '{row}', '{column name}', '{time stamp}'
delete 'emp', '1', 'personal data:city', 1417521848375
The delete command can be used to delete certain columns.In order to delete an entire row including all of its columns, use delete all.To delete all the rows from a table, use truncate ‘tablename’. Under the hood, HBase will disable, drop, and re-create the table
Upvotes: 2