0

Is it possible to run more than one Cassandra query from a single Cassandra file?

So that if I share that file, the others can run it to replicate the database in all systems

Rajesh Kumar
  • 1,270
  • 4
  • 15
  • 31
  • possible duplicate of [how to load schema file into Cassandra with cqlsh](http://stackoverflow.com/questions/15750264/how-to-load-schema-file-into-cassandra-with-cqlsh) – Mikhail Stepura May 16 '14 at 17:31

2 Answers2

1

The easiest way is to pass the file containing CQL statements to either cqlsh (using the -f option) or using DevCenter

Alex Popescu
  • 3,982
  • 18
  • 20
0

If you are using Java, the Achilles framework has a class called ScriptExecutor that you can use to run CQL statements from a file and even plug in parameters to dynamically change the statements during execution.

ScriptExecutor documentation

Jason
  • 2,006
  • 3
  • 21
  • 36