我正在尝试在Python中从Cassandra运行CQL。但是我得到了这个错误,

InvalidRequest: code=2200 [Invalid query] message="unconfigured table openeventstream"


有人知道发生了什么吗?

码:

session = cluster.connect()
session.set_keyspace('meetup')
rows = session.execute('SELECT *  FROM meetup.openEventStream')
for x in rows:
    print x

最佳答案

Cassandra将未加引号的文本转换为小写,因此您需要将表名放在引号中:

rows = session.execute('SELECT *  FROM meetup."openEventStream"')

关于python - InvalidRequest:代码= 2200 [无效查询]消息=“未配置的表openeventstream”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/35748817/

10-12 16:41