卡桑德拉非柜台家庭 [英] Cassandra Non-Counter Family

查看:44
本文介绍了卡桑德拉非柜台家庭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图执行以下CQL 3语句

I'm attempted to execute the following CQL 3 statement

 CREATE TABLE summary (
                id uuid,
                "client" bigint, 
                "campaign" text, 
                "unit" bigint,
                "view" counter,
                PRIMARY KEY ("client", "campaign", "unit"));

我得到的错误是我无法在非计数器列族上创建计数器列。

The error I'm getting is that I cannot create a counter column on a non-counter column family.

有什么想法吗?

推荐答案

此问题的解决方案是任何非计数器列都必须是主键的一部分。列ID uuid是导致此问题的原因,将其删除即可创建表。

The solution to this issue is that any non-counter column must be part of the primary key. The column id uuid was the one causing the issue, removing it allowed the table to be created.

这篇关于卡桑德拉非柜台家庭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆