How to Connect to Cassandra

The Connection Dialog and the fields available there ( host, port, user, database, SSH ) are explained in the Connection dialog page.

How to Connect to Cassandra

DbSchema connects to Cassandra using its own JDBC driver which calls the native Cassandra driver. The DbSchema driver is open source and can be found at

The default DbSchema connection dialog shows an option to connect only to a single host. To connect to multiple hosts use the 'Advanced Tab'/'Enforce custom URL' and edit a string like here:

This will be translate an URL like jdbc:cassandra:// into:
  Cluster cluster = Cluster.builder().addContactPoint("").withPort(9042).build();
  Session session = cluster.connect("mykeyspace");

Enable Remote Connections - Windows

To enable remote connections you will have to edit the cassandra.yaml file from C:\Program Files\DataStax Community\apache-cassandra\conf

set the
  • start_rpc: true
  • rpc_address: your_ip
  • cdc_raw_directory: "C:/Program Files/DataStax-DDC/data/cdc_raw"
The 'cdc_raw_directory' does not exist in the default configuration file. Cassandra server 3.9 didn't start without adding it. Look in DataStax-DCC/logs for errors.

Go to -> Control Panel\System and Security\Administrative Tools -> Services -> Restart service. DataStax DDC Server 3.9.0 .

Cassandra databases talk to each other using a different protocol on a different port. These two can not be the same and gives us some extra configuration. Cassandra Default ports:
- 9042 Cassandra client port.
- 9160 Cassandra client port (Thrift).

How to Install Cassandra on Windows

Cassandra can be installed on Windows from After installation go to installation folder: C:\Program Files\DataStax Community\apache-cassandra\conf and enable remote connections as in the previous chapter.

From Windows menu you can start DataStax Dev Center and connect to the installed Cassandra:

To execute a command select first a connection in the top menu.

  WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy',
  'datacenter1' : 3 } AND DURABLE_WRITES = false;

  CREATE TABLE sample.table1 ( id int primary key, name text);


  CREATE TYPE sample.flagtype (data map<text,text>,working text);

  CREATE TABLE sample.table1a (abc text,
                     hello text,
                     flag frozen<flagtype>,
                     PRIMARY KEY (abc));

  INSERT INTO sample.table1a JSON '{"abc":"abc", "hello":"world", "flag":{"data":{"hi":"cassandra"}, "working":"no"}}';