【发布时间】:2018-04-12 12:55:06
【问题描述】:
我正在使用 python 驱动程序和 Cassandra,我创建了以下架构
CREATE TABLE channelFollowers(
channelID BIGINT,
isfavorite BOOLEAN,
userID BIGINT,
followDate TIMESTAMP,
PRIMARY KEY (userID, channelID, followDate)
);
我的问题是,我如何在 select 和 update 查询的 where 子句中使用 followDate,我已经尝试过但它不起作用,它给出了以下错误
typeerror: not enough arguments for format string
任何人都可以帮助我吗?
这是我的代码
channelLike = channelSession.execute("update channelfollowers set isblocked=%s, isfavorite=%s where userid=%s and channelid=%s and followdate=%s",[int(userid),int(channel_id),followDate]
【问题讨论】:
-
显示您的代码。
-
我已经更新了我的问题
标签: python cassandra cassandra-python-driver