Anyone who has worked with Apache Cassandra will not underestimate the importance of selecting the right data model. However, this could be a daunting task due to the lack of a generic schema generator (in Java). For example, each time you create a new class/model or your class/model structure changes, you’ll have to write or rewrite the CQL statements required to create or update the schemas in your Apache Cassandra cluster.
Automation is a core tenet of DevOps and so I have decided to automate this process. I have written a Java library that:
- Generates the CQL statements required to create or update schemas in an Apache Cassandra cluster.
- Builds a range of CQL statements from standard Java classes/models.
I have now decided to open source this library! So check out cql-statement-builder and let me know your thoughts.