Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Dumping/Loading Schema in Cassandra

DZone's Guide to

Dumping/Loading Schema in Cassandra

· Database Zone
Free Resource

Whether you work in SQL Server Management Studio or Visual Studio, Redgate tools integrate with your existing infrastructure, enabling you to align DevOps for your applications with DevOps for your SQL Server databases. Discover true Database DevOps, brought to you in partnership with Redgate.

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.

It’s easier than you think to extend DevOps practices to SQL Server with Redgate tools. Discover how to introduce true Database DevOps, brought to you in partnership with Redgate

Topics:
architects ,nosql ,tips and tricks ,cassandra

Published at DZone with permission of Brian O' Neill, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}