How to execute ccm cqlsh commands like INSERT ,CREATE and SEELCT inside shell script?

284 Views Asked by At

Wanted to execute few commands independently like CREATE, INSERT and SELECT inside shell script i.e., makefile.sh. Example:-

cqlsh "CREATE <SOME QUERY>;"
cqlsh "INSERT <SOME QUERY>;"
cqlsh "SELECT <SOME QUERY>;"

Is there any way to do so??

1

There are 1 best solutions below

0
Horia On

You could use the -e option and specify a cql statement or -f and specify a file. More details here.