Cassandra Connection Help
Cassandra uses a query language called CQL that does not include all features of SQL. For information on the
syntax supported by RazorSQL for querying and updating
Cassandra databases, see the following:
RazorSQL Cassandra SQL Syntax Guide
RazorSQL supports connecting to Cassandra via two different drivers / methods. These are the DataStax driver and the Apache Cassandra driver. The DataStax driver is the more modern driver and supports connecting to Cassandra via the CQL protocol. The Apache driver connects via a legacy protocol called Thrift. It is recommended to use the DataStax driver when possible.
If using the legacy Apache driver to connect to Cassandra, the Thrift protocol needs enabled on the Cassandra database. Many Cassandra installations do not have the Thrift protocol enabled by default. To enable this protocol, a line needs to be set to a certain value in the Cassandra configuration file.
The Cassandra configuration file is called cassandra.yaml, and is in the "conf" directory under
the Cassandra installation. There is a line in this file that contains the text "start_rpc".
The line that contains start_rpc should be changed to look like the following in the file:
start_rpc: true
After that change is made, the Cassandra server needs restarted to pick up the configuration change to
enable the Thrift protocol.
Connecting to Cassandra
To connect to Cassandra in RazorSQL, select the Connections - Add Connection Profile menu option.
Then, select Cassandra as the database type and click "Continue". The default connection
type for Cassandra is the DataStax JDBC driver. To have RazorSQL download and install the DataStax
driver, click the "Auto Download Driver" button on the right-side of the screen. This will
download a fully configured DataStax driver to your machine.
Once the driver is finished downloading, the following information needs entered
to be able to connect to Cassandra:
Profile Name: This is the name of the RazorSQL connection profile.
Login: This is not usually used for Cassandra, but if your database
has this enabled, enter your login id.
Password: This is not usually enabled for Cassandra, but if your database
has this enabled, enter your password.
Host or IP Address: The host or ip address of the Cassandra database server.
Port: The port the Cassandra database is listening on. If this is left blank, 9160 will
be assumed.
Keyspace Name: If a value is specified for the keyspace name, after connecting,
RazorSQL will set that value as the default keyspace.