You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2022/06/11 23:16:00 UTC

[jira] [Closed] (HBASE-2005) 'Shell' suggestion - equivalent of 'truncate' for a table

     [ https://issues.apache.org/jira/browse/HBASE-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kyle Purtell closed HBASE-2005.
--------------------------------------

> 'Shell' suggestion - equivalent of 'truncate' for a table
> ---------------------------------------------------------
>
>                 Key: HBASE-2005
>                 URL: https://issues.apache.org/jira/browse/HBASE-2005
>             Project: HBase
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 0.20.1
>            Reporter: Doug Meil
>            Priority: Minor
>
> The hbase shell has 'delete' and 'deleteall' for deleting a cell/cells for a given row.
> I don't see any equivalent of the RDBMS equivalent of 'truncate' that would delete all the rows in a table, however (i.e., based on my understanding of the shell, 'deleteall' applies horizontally, but not vertically).
> At the very least, this could be useful for development purposes when you want to quickly remove test data from a table.  
> Nice to have - something like:
> truncate mytable    (no column families specified...  so it removes all the rows from every column family)
> truncate mytable family1    (remove all rows from table 'mytable' but only for column family 'family1').
> Something like that...  just a suggestion.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)