Manage keyspaces and tables
Use OpsCenter Monitoring to edit keyspace settings, delete a keyspace, or inspect tables and user-defined objects within a keyspace.
In earlier versions of Apache Cassandra®, tables were known as column families. Some metrics and labels still use the term column family instead of table.
Add a keyspace
Adding a keyspace in OpsCenter is no longer supported as of OpsCenter version 5.2 and later.
The Data Explorer feature in OpsCenter has been removed.
Add new keyspaces using CQL in DataStax Studio or with the CREATE KEYSPACE command.
Delete a keyspace
|
Deleting a keyspace is a destructive action that drops the keyspace and all of its contents, including user-defined objects, indexes, and tables. |
-
In the OpsCenter navigation menu, click the name of the cluster you want to manage, and then click Data.

-
Select the checkbox for each keyspace that you want to delete, and then click Delete.
-
Confirm to proceed with deletion.
You can also delete a keyspace from the Edit Keyspace dialog.
Edit a keyspace
-
In the OpsCenter navigation menu, click the name of the cluster you want to manage, and then click Data.

-
In the list of keyspaces, click the name of the keyspace that you want to edit.
-
On the Keyspace Settings page, click Edit.

-
On the Edit Keyspace dialog, edit the keyspace settings as needed.

-
strategy_class: Set the replication strategy for the keyspace.
If the replication strategy is
NetworkTopologyStrategy, you must specify the datacenters for replication and the replication factor for each datacenter.To add a datacenter to the replication strategy, click Add Datacenter.
The CQL
CREATE KEYSPACEandALTER KEYSPACEcommands allow the keyspace schema definition to include datacenters that are not part of the cluster’s topology. Any datacenter that is not part of the monitored cluster is flagged with report_problem Warning.To remove a datacenter from the keyspace’s replication strategy, click Delete.
To keep the datacenter in the replication strategy but prevent replication to that datacenter, enter
0for the datacenter’s Replication Factor. -
durable_writes: Whether to use durable writes for the keyspace. If disabled (False), writes to the keyspace bypass the commit log. This can cause data loss if a node fails before the data is flushed to disk.
-
Delete Keyspace: Permanently delete the keyspace and all of its contents, including user-defined objects, indexes, and tables.
-
-
Click Save Keyspace.
View tables in a keyspace
When you create a table in your database, you can view the table’s schema and metrics in OpsCenter.
If OpsCenter authentication is enabled, you must have a role with the View Schema Data permission.
-
In the OpsCenter navigation menu, click the name of the cluster you want to manage, and then click Data.

-
In the list of keyspaces, click the name of the keyspace that you want to view.
The number in parenthesis after each keyspace name is the number of tables that are currently in the keyspace.
-
On the Tables tab, click the name of the table that you want to view.
The
(in memory)label indicates DSE In-Memory tables.
By default, the table schema definition is shown. To view table metrics:
-
Click View Metrics.
-
Select a metric.
-
Select the scope of the metrics data as all nodes in the cluster, all nodes in a datacenter, or a specific node.
-
Delete a table
|
Deleting a table is a destructive action that drops the table and all of its data. |
-
In the OpsCenter navigation menu, click the name of the cluster you want to manage, and then click Data.

-
In the list of keyspaces, click the name of the keyspace that you want to view.
-
On the Tables tab, select the checkbox for each table that you want to delete, and then click Delete.
Truncate table data
Truncating a table deletes all data contained in the table without deleting the table itself.
The truncate action in OpsCenter is the same as the CQL TRUNCATE command.
|
Truncating a table is a destructive action that drops all rows, leaving an empty table.
For important information about truncate operations, see the |
If OpsCenter authentication is enabled, you must have a role with the View Schema Data and Truncate Data permissions.
-
In the OpsCenter navigation menu, click the name of the cluster you want to manage, and then click Data.

-
In the list of keyspaces, click the name of the keyspace that you want to view.
-
On the Tables tab, click the name of the table that you want to truncate, and then click Truncate.
Be sure to click the name of the table so that its schema definition appears in the table details area before you click Truncate. Otherwise, you might mistakenly truncate a different table. Multi-table truncation isn’t supported.

-
On the confirmation dialog, make sure the correct table name is shown, and then click Truncate TABLE_NAME to proceed.

The Table Truncated dialog confirms that the truncate operation was executed. Click Close to exit this dialog.
When you truncate a table from within OpsCenter, a snapshot is created if one doesn’t already exist.
This snapshot is stored in the snapshots directory within the table’s directory.
You can manually restore the table data from this snapshot using the sstableloader tool.
This snapshot cannot be restored by the Backup Service.
View user-defined objects in a keyspace
Use OpsCenter Monitoring to get read-only CQL statements that describe user-defined objects in a keyspace.
This is equivalent to running the DESCRIBE TYPE, DESCRIBE FUNCTION, and DESCRIBE AGGREGATE commands.
If OpsCenter authentication is enabled, you must have a role with the View Schema Data permission.
-
In the OpsCenter navigation menu, click the name of the cluster you want to manage, and then click Data.

-
In the list of keyspaces, click the name of the keyspace that you want to inspect.
-
Click the User-Defined Types, User-Defined Functions, or User-Defined Aggregates tab to view different user-defined objects in the keyspace.
-
Click the name of a UDT, UDF, or UDA to view a CQL statement describing that object.
