Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra CLI: specify name of primary key

Tags:

cassandra

cql

Is it possible to specify a name of primary key via cassandra CLI, like via CQL:

create columnfamily test (
  my_key_name varchar primary key,
  value varchar);

By default, cassandra cli creates primary key with name 'KEY'

like image 902
Yury Pogrebnyak Avatar asked Oct 09 '22 02:10

Yury Pogrebnyak


1 Answers

The attribute you're looking for is key_alias. Unfortunately, you can't currently set it through cassandra-cli, only cqlsh. I've opened CASSANDRA-4158 to fix this.

like image 96
Tyler Hobbs Avatar answered Oct 30 '22 02:10

Tyler Hobbs