Speed up your development and test cycles with fully automated data delivery, view a 10 minute demo, brought to you in partnership with Delphix.
This handy command line will dump a schema from Cassandra:
echo -e "use your_keyspace;\r\n show schema;\n" | bin/cassandra-cli -h localhost > mySchema.cdl
I always forget the "-e" on echo, which is why I thought I would blog this. We've started using ".cdl" as the extension, short for "Cassandra DDL".
Coincidentally, you can then load it with:
bin/cassandra-cli -h localhost -f mySchema.cdl
Hope people find this useful.
Learn how test data on demand can lead to faster application development, read the IDC white paper, brought to you in partnership with Delphix.
architects,nosql,tips and tricks,cassandra
Published at DZone with permission of
Brian O' Neill
, DZone MVB
Opinions expressed by DZone contributors are their own.