how do I restore a previous backed up snapshot If I alter a table by adding new column or change the partition key of the table
how do I restore a previous backed up snapshot If I alter a table by adding new column or change the partition key of the table
The snapshot itself contains a copy of the schema in a file called schema.cql
.
When you want to restore a table with a different schema, you will need to:
DROP
the table.schema.cql
file.NOTE: You will lose the data created after the snapshot was taken.
It is not possible to change the partition key of a table once it's been created.
If you need a new partition key, you will need to start from scratch and create a new table.
If you want to import the data in old table, you will need an ETL tool (like a Spark job) or write an app that will migrate the data to the new table. Cheers!
6 People are following this question.
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2023 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use