Truncating data from a table

Truncate data from a table from within the Data workspace in OpsCenter Monitoring. If OpsCenter authentication is enabled, the user role must have the Truncate permission.

Truncate data from a table from within the Data workspace in OpsCenter Monitoring. A message warns you that truncated data is lost from OpsCenter. If a snapshot of the table does not already exist, a snapshot is created on your behalf. That snapshot resides in a snapshot directory within its table directory. If you need to restore the table data at some point in the future, you must do so manually by running sstableloader on the SSTables in the snapshot. The snapshot cannot be restored from the Backup Service. See Restoring from a snapshot in the DataStax Cassandra documentation.

To find out more about the ramifications of truncating data, and an alternative method of doing so manually, see TRUNCATE in the DataStax CQL documentation.

Note: If OpsCenter authentication is enabled, the user role must have the Truncate Data permission to perform the truncate operation.

Procedure

  1. Click Cluster > Data in the left navigation pane.
  2. Select the keyspace that contains the table to truncate.
  3. In the Tables tab, select the table for which you want to truncate data.
    You can only truncate data from one table at a time.

    Truncate link

  4. Click the Truncate link displayed above the CQL pane.
    When OpsCenter authentication is enabled, the Truncate link is only available if the Truncate Data permission is enabled for your assigned role.
    The Truncate Table dialog appears.
    Warning: Removal of the data is irreversible in OpsCenter.

  5. Click Truncate name_of_table.
    The Table Truncated dialog appears and informs you the table was truncated.
  6. Click Close.