I am newbie in Cassandra and following this Cassandra tutorial on youtube. In this tutorial, author is creating two tables as shown below:
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));
I am facing two problems now.
First problem is that children
table gets created only when I remove with compact storage
.
Second problem is that while creating naughtyornicelist
table, Cassandra is throwing following error : Bad Request: No definition found that is not part of the PRIMARY KEY
I gave following command
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>
I am not able to find why this error is coming and how to resolve this error. Request Cassandra people to please help.