我希望能够从bash命令执行CQL查询。
我得到了:
有什么建议吗?
[cqlsh 3.1.8 | Cassandra 1.2.19 | CQL规范3.0.5 | Thrift协议19.36.2]
[root@hostname ~]# /opt/apache-cassandra-1.2.19/bin/cqlsh -k "some_keyspace" -e "SELECT column FROM Users where key=value"
我得到了:
cqlsh: 错误:没有这个选项:-e
选项:
--version show program's version number and exit
-h, --help show this help message and exit
-C, --color Always use color output
--no-color Never use color output
-u USERNAME, --username=USERNAME
Authenticate as user.
-p PASSWORD, --password=PASSWORD
Authenticate using password.
-k KEYSPACE, --keyspace=KEYSPACE
Authenticate to the given keyspace.
-f FILE, --file=FILE Execute commands from FILE, then exit
-t TRANSPORT_FACTORY, --transport-factory=TRANSPORT_FACTORY
Use the provided Thrift transport factory function.
--debug Show additional debugging information
--cqlversion=CQLVERSION
Specify a particular CQL version (default: 3.0.5).
Examples: "2", "3.0.0-beta1"
-2, --cql2 Shortcut notation for --cqlversion=2
-3, --cql3 Shortcut notation for --cqlversion=3
有什么建议吗?
cqlsh -e "SELECT column FROM some_keyspace.Users where key=value;"
? - markccqlsh -h
以获取支持的选项。 - undefined_variable