我是 Cassandra 的新手,并在 youtube 上关注这个Cassandra 教程。在本教程中,作者创建了两个表,如下所示:
create table children(childid varchar, firstname varchar, lastname varchar, country varchar, state varchar, zip varchar, primary key(child)) with compact storage;
create table naughtyornicelist(standingbycountry varchar, state varchar, zip varchar, childid varchar, primary key(standingbycountry, state, zip, childid));
我现在面临两个问题。
第一个问题是children
只有在我删除时才会创建表with compact storage
。
第二个问题是,在创建naughtyornicelist
表时,Cassandra 抛出以下错误:Bad Request: No definition found that is not part of the PRIMARY KEY
我给出了以下命令
cqlsh:northpole> create table naughtyornicelist(standingbycountry varchar, state varchar, zip varchar, childid varchar, primary key(standingbycountry, state, zip, childid));
Bad Request: No definition found that is not part of the PRIMARY KEY
cqlsh:northpole>
我无法找到此错误出现的原因以及如何解决此错误。请求 Cassandra 人员提供帮助。