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
Driverssection 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 Pathtab - Click the
Addbutton - Select your directory where you unzipped the downloaded drivers and add all the .jar files
- Still in this dialog, at the bottom set
Class Nametocom.dbschema.CassandraJdbcDriver - Click
OKto 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
Aliasessection click the + (plus) icon - Enter your connection details. In the simplest case the URL may be e.g.
jdbc:cassandra://hostwherehostis the hostname of the DB server. Otherwise please refer to theExample URLabove. - You may test your connection clicking the
Testbutton, it should succeed. - Click
OKto close the dialog.
- Double click the connection to connet it
- Go to the
SQLtab, 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