Search code examples
cassandraerlangerlang-shell

Can't create connection using CQErl (Erlang-Cassandra driver)


I'm trying to connect to Cassandra from Erlang shell using Cqerl. I use {ok, Client} = cqerl:get_client({}). to create connection, as stated in the documentation. Then, the following error occurs.

** exception error: bad argument
 in function  ets:lookup/2
    called as ets:lookup(cqerl_client_tables,
                         {{{127,0,0,1},9042},[{keyspace,undefined}]})
 in call from cqerl_hash:get_table/1

is there any solution?


Solution

  • I guess the problem is that there is no 'cqerl_client_tables' ets table. Please make sure you've started the application:

    application:start(cqerl)