1

I want to store sensor data from my Raspberry Pi using Kaa and Cassandra. I tried following the instructions for the Cassandra Demo and when I type in the commands:

cqlsh
use kaa;

This error message appears:

InvalidRequest: code=2200 [Invalid query] message="Keyspace 'kaa' does not exist"

But kaa does exist as a Keyspace in the Cassandra Demo in the Kaa Sandbox.

Is there something else I need to do to make Cassandra recognize that 'kaa' does exist (and link it to that specific application)?

Ryan
  • 105
  • 4
  • 14

2 Answers2

0

Try the next solution:

  1. enter cqlsh on Kaa Sandbox
  2. execute cqlsh> SOURCE '/usr/lib/kaa-node/conf/cassandra.cql';
  3. check if keyspace has appeared cqlsh> DESCRIBE keyspaces; If everything ok you should see kaa keyspace among others.

Also, it would be great if you provide some information about Kaa Sandbox. You can see such info in the bottom of Sandbox UI (default port is 9080).

Andrey Pasika
  • 78
  • 1
  • 8
  • It is listed there now, thank you. But the tables I would expect to be there are not there. The example has the tables; sensor_per_row, sensor_per_date, and sensor_per_region. But when I list the tables I see 14 other tables that I was not expecting. Do I have to create the tables here manually? – Ryan Feb 09 '17 at 14:23
  • All tables are constructed during log appender initialization, since they are already there you can go on admin UI (port 8080) `->Cassandra data analytics demo -> Log appenders` edit (for example change its name) and save it. As a result corresponding tables will appear in kaa keyspace. – Andrey Pasika Feb 09 '17 at 16:26
  • Thank you, they do appear now, but they are still empty after I re-run the program. – Ryan Feb 14 '17 at 17:50
0

Configure Cassandra cqlsh:

sudo cqlsh -f /etc/kaa-node/conf/cassandra.cql

(mentioned in the single node setup)

IstaLibera
  • 580
  • 5
  • 22
  • The database and tables do appear now, but they are still empty after I re-run the program. – Ryan Feb 14 '17 at 17:52
  • Did you add a Cassandra log appender correctly? Be careful with the column mapping. - The first time I tried myself the data was not inserted as the mapping was incorrect. – IstaLibera Feb 15 '17 at 08:56