我在卡桑德拉的桌子是:
CREATE TABLE cpe (
ip inet PRIMARY KEY,
cpe frozen<map<text, frozen<list<text>>>>
);
我的表中已经有一些元素,我正在尝试基于IP进行选择,但我不断得到错误
mismatched input '.' expecting EOF (... from cpe where ip=10.240[.]...)">
目前我的Python代码如下所示:
rows = session.execute('SELECT ip,cpe from analysis limit 1000')
for i in rows:
cpe=session.execute('select cpe from cpe where ip='+str(i.ip)) #Error here
提前谢谢
我想出来了,以防其他人遇到同样的问题
cpe=session.execute('select cpe from cpe where ip='+"'"+i.ip+"'")
应该有用相关问题 更多 >
编程相关推荐