且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

通过Shell脚本执行CQL?

更新时间:2023-12-05 12:16:04

cqlsh -e从ks.table限制1中选择*; > 〜/输出


I am trying to execute the CQL commands from shell script. I am able to connect to the cqlsh (CQL version i'm using is 1.1.18) but unable to send the queries to cql.

Any ideas or suggestion how to proceed on this? Do I need to connect to Cassandra and execute few commands (select/update ) with shell script ??

cqlsh -e "select * from ks.table limit 1;" > ~/output