Reading and Writing to Cassandra Database

Support/help with CloverETL (4.9) and CloverDX (5.0 or newer) implementation problems

bhavinultimate
Posts: 11
Joined: Mon Dec 23, 2013 6:28 am

Reading and Writing to Cassandra Database

Postby bhavinultimate » Sat Jul 11, 2015 9:31 am

Hello,

I want to read and write data to Cassandra Database.However i am unable to find out any reader or writer componet for Cassandra.
Can anyone help me to figure out how to load and read from Cassandra.
Your help would be appreciated .


Thanks
Bhavin

slechtaj
Posts: 192
Joined: Wed Aug 15, 2012 8:18 am

Re: Reading and Writing to Cassandra Database

Postby slechtaj » Wed Jul 15, 2015 12:41 pm

Hi Bhavin,

In order to work with Cassandra DB, you will just need to use external Cassandra JDBC driver, since the driver does not come with the Clover. After you get the driver, you may simply create a new DB connection and use it in standard DB componets (DBInputTable, DBOutputTable, DBExecute). However, you should keep in mind that since the CQL language used by Cassandra is slightly different to other SQL dialects, you will not be able to use all functions of mentioned components - this applies to the following features:
  • Validation might not work in some cases (especially when "append WHERE 1=0" clause is used).
  • Metadata extraction from DB query does not work (validation is required).
  • Browsing DB schema in DB components might not work (you will need to write your CQL query manually).

Regarding the BC connection configuration itself, you will not only need to add the JDBC driver jar file itself but also the other Cassandra JDBC dependencies. Configuration information and links to required JAR files (incl. dependencies) are listed here: https://code.google.com/a/apache-extras ... ndra-jdbc/
When loading driver from JAR (green "plus" button), make sure you select all the JAR files (driver and all required dependencies).

On the aforementioned site you can also see format of the URL you need to use in the DB connection wizard (jdbc:cassandra://yourhosts:9160/yourkeyspace).

Hope it helps.
Jan Slechta
CloverCARE Support
CloverETL | Rapid Data Integration

Visit us online at http://www.cloveretl.com

How to speed up communication with CloverCARE support

vorn10
Posts: 1
Joined: Wed Feb 27, 2019 7:22 pm

Re: Reading and Writing to Cassandra Database

Postby vorn10 » Wed Feb 27, 2019 7:23 pm

To allow Cassandra to select a contiguous set of rows, the WHERE clause must apply an equality condition to the king component of the primary key. The ALLOW FILTERING clause is also required. ALLOW FILTERING provides the capability to query the clustering columns using any condition.


cron