Connecting to a Cassandra database

Hi …

I need to connect to and read from a Cassandra DB. Has anyone done this before?

Thanks.

tC/.

@TigerCole

  1. Download the driver from:
    Download Cassandra JDBC Driver | DbSchema

by clicking on:
image

  1. Extract the Zip in folder.
  2. In KNIME (in Modern UI) Go to: Preferences.
  3. Select Databases from left panel:
  4. From Right Side Panel select add:
  5. Now click Add:
  6. Select Folder that you have extracted.
  7. Now click on Find Driver Classes:
  8. Now fille in below information:
  9. In URL Template fill (I made as per documentation but you might need to test and change but try this): jdbc:cassandra://<host>:<port>/<keyspace>;dataCenter<&options>
  10. Then Click OK.
  11. Then Apply and then Apply and Close.

Now create workflow and DB Connector Node.

In configuration windows. uncheck the Use Latest Driver Version available:

Now you can see your driver appears here:

I don’t know which Dialect used by Cassandra (is it MySQL’s or SQLServer’s) if you know which DB query and functionality matches with Cassandra you can select that. (This is the ORM that will change your query as per DB) Like MariaDB uses MySQL’s dialect, so if I will be using MariaDB i will choose Dialect MySQL.

You have a to go forward I guess. Try and do some R&D for Dialect and URLs to make it work.
I hope it will help!.

2 Likes

@TigerCole

I found the URLs (place the template of Standard):

image

Now, I found that Cassandra has its own dialect.

org.hibernate.ogm.datastore.cassandra.CassandraDialect

But I don’t know how to add Dialect to KNIME.

Try setting this dialect in Flow Variable please and check if it works.

1 Like

Hi @prashant7526

Thanks for the pointer to the JDBC driver. The dev team I am working with is working on the correct config that will work with our project.

As soon as we have it figured out I will post an update.

tC/.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.