0
votes

client = Cassandra.new('keyspacetest', '127.0.0.1:9160')

2.1.0 :019 > client.insert('users', '0', { 'id' => 'John', 'email' => '[email protected]' }) Cassandra::AccessError: Invalid column family "users" from home/cassandra/columns.rb:59:in column_family_property' from home/cassandra/columns.rb:44:incolumn_name_class_for_key' from home/cassandra/columns.rb:12:in column_name_class' from home/cassandra/helpers.rb:21:inextract_and_validate_params' from home/cassandra/cassandra.rb:399:in insert' from (irb):19 from home/.rvm/rubies/ruby-2.1.0/bin/irb:11:in'

database:

cqlsh:keyspacetest> select * from users ;

id | email hi | [email protected] cqlsh:keyspacetest> DESC TABLE users ;

CREATE TABLE users ( id text, email text, PRIMARY KEY ((id)) )

1

1 Answers

0
votes

I suspect you're trying to insert data into CQL table/column family using "pure" Thrift API. That doesn't work well. If you want to use CQL then you have to use a client library which will allow you to execute CQL statements (https://github.com/iconara/cql-rb for ex.).