KB Article #178209

Changing table structure in KPS

Problem

What is the best way to change table structure in KPS? Modifying table structure in configuration the re-create the table can lead to some corruption for that table in Cassandra. Datastax advises you to delete and recreate the entire complete keyspace.

Resolution

- The best way to change table structure is to create a new table using the same alias as the previous table:

* Using kpsadmin, backup the content of the table you wish to modify.

* Change the alias of the table you want to modify the structure of.

* Create a new table using the alias previously used.

* Deploy

* If you only added some columns to your previous schema, you can restore data from previous backup with kpsadmin, otherwise, the data has to be restored manually.