通过Shell脚本执行CQL? [英] Executing CQL through Shell Script?

查看:169
本文介绍了通过Shell脚本执行CQL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从shell脚本执行CQL命令。
我能够连接到cqlsh(我正在使用的CQL版本是1.1.18),但是无法将查询发送到cql。



任何想法或建议如何进行此操作?
是否需要连接到Cassandra并使用shell脚本执行一些命令(选择/更新)?

解决方案

<$ p $ p> 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

这篇关于通过Shell脚本执行CQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆