Cassandra : Delete the data without removing the table structure

2.2k Views Asked by At

I'm running some tests on cassandra, that need the data in the table to be removed after every run. So I wrote a script that TRUNCATES the data. My question is, does it leave the table unconfigured(removes all columns) after I TRUNCATE the table? I'm a cassandra beginner. Need some insights on this.

1

There are 1 best solutions below

0
On

TRUNCATE command remove all data not schema

TRUNCATE table_name;

Removes all data from the specified table immediately and irreversibly, and removes all data from any materialized views derived from that table.

Source : https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlTruncate.html