I require to have a table in my Cassandra that need to have any number(bigint) as primary key type. For eg., here is my table:
CREATE TABLE users (id bigint PRIMARY KEY,username text,email text,age int);
Now, whenever with uuid as primary key, we can autoincrement using now()
or uuid()
, what option do I have for numeric primary key?
If using a numeric primary key is an awful idea, suggest a function(perfect hash) that can convert any uuid to numeric form and if at all possible, vice-versa.
Yep. You guessed it right. RDBMS background guy.