Backup a select with a where clause result of cassandra for restoring later

130 views Asked by At

I am making changes to a row in cassandra and want to restore to previous state later on. Using older DBeaver Entrpise version 4.0.5, exporting as insert / csv / json. But the map columns on the table are not exported properly and inserting this exported data is failing.

Please suggest how to backup the row and restore it. Since the data is large, it is difficult to construct the insert statement manually.

1

There are 1 answers

2
dilsingi On

Before you make changes to that row, do a Select * from <table> where <partition_key> = ?? specifying the partition key.

Once you are done with the changes, use the above output and insert it back using Insert into KeyspaceName.TableName(ColumnName1, ColumnName2, ColumnName3 . . . .) values (Column1Value, Column2Value, Column3Value . . . .)