Cassandra – Allow Filtering example

create table User(
    email text,
    name text,
    desc text,
    user_id uuid
    PRIMARY KEY((email), name, user_id)
) WITH CLUSTERING ORDER BY (name DESC, user_id ASC);

Allow Filtering can only work with the clustering key.

select * from user where name = 'Test' allow filtering;

Some useful cassandra commands

/>list users limit 3;
Advertisements
This entry was posted in cassandra, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s