Set up a GUI client application for Cassandra
- Make sure you have Java 11 or newer (and set as default Java). (Otherwise you will get an error message when you try to add the driver in SQuirreL SQL.)
- Download the driver
wget https://dbschema.com/jdbc-drivers/CassandraJdbcDriver.zip
(Go to https://dbschema.com/cassandra-jdbc-driver.html there you will find the link for the driver: "Alternative you may download the Cassandra driver using this link.")
- unzip contents of the driver zip to any directory of your choice (I created /opt/CassandraJdbcDriver and unzipped contents there)
- Install SQuirrelSQL (see e.g. https://sourceforge.net/projects/squirrel-sql/)
- Run SQuirrelSQL
- Select menu item
Windows
->View Drivers
- In the
Drivers
section click the + (plus) icon - Fill in the following (recommended) values:
Name
:Cassandra JDBC Driver (dbschema.com)
Example URL
:jdbc:cassandra://host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[keyspace][?options]]
Website URL
:https://dbschema.com/cassandra-jdbc-driver.html
- Click the
Extra Class Path
tab - Click the
Add
button - Select your directory where you unzipped the downloaded drivers and add all the .jar files
- Still in this dialog, at the bottom set
Class Name
tocom.dbschema.CassandraJdbcDriver
- Click
OK
to close the dialog.
Note: the example URL is documented at the driver's website, the class name can be found from the drivers's source code (which is linked from the driver's website).
- Select menu item
Windows
->View Aliases
- In the
Aliases
section click the + (plus) icon - Enter your connection details. In the simplest case the URL may be e.g.
jdbc:cassandra://host
wherehost
is the hostname of the DB server. Otherwise please refer to theExample URL
above. - You may test your connection clicking the
Test
button, it should succeed. - Click
OK
to close the dialog.
- Double click the connection to connet it
- Go to the
SQL
tab, enter your statement e.g.select ...
- Ctrl + Enter to run the query (or click the corresponding icon)
Thanks for the detailed instructions. I wasn't able to connect to DSE Cassandra using SQuirrelSQL v4.3.0 with the example URL format above, but this worked for me:
jdbc:c*://host/keyspace