Import and export keyspace or schema in cassandra

This command line will export a keyspace from Cassandra:

this one will export a schema from Cassandra:

Then, you can import it with:

You can also open the terminal in the location of cql file and then open cqlsh shell. Therefore, it is not necessary to write all path:




Also published on Medium.