Cassandra 无效查询:缺少一些集群键

Cassandra Invalid Query: Some cluster keys are missing

我正在使用 Cassandra 3.0。

我的 table 是使用此查询创建的,但是当我尝试将数据插入 table 时,出现错误:'Some cluster keys are missing: created'

Table结构:

CREATE TABLE db.feed (
    action_object_id int,
    owner_id int,
    created timeuuid,
    action_object text,
    action_object_type int,
    actor text,
    feed_type text,
    target text,
    target_type int,
    verb text,
    PRIMARY KEY (action_object_id, owner_id, created)
) WITH CLUSTERING ORDER BY (owner_id ASC, created ASC)

您必须为所有主键提供值。 action_object_id、owner_id、created 必须在您的插入查询中提及。 例如:插入 db.feed(action_object_id, owner_id, created, ...) 值 (?,?,?,...)。并且您不能为主键提供 NULL 值。 已创建 不能为空。