Cassandra Snap Pack
Overview
You can use the Cassandra Snap Pack to work with data in Apache Cassandra.
Use Snaps in this Snap Pack to:
- Execute a Cassandra Select.
- Execute a Cassandra statement or query.
Supported Versions
This Snap Pack is tested against Cassandra versions 1.2, 2.0, and 3.0.
Known Issues
Snaps in this Snap Pack display an exception (raised by the JDBC driver) when you query a map column that has a timestamp as the key
Example
- Create a table containing a map whose key is a
timestamp:
CREATE COLUMNFAMILY t (userid text PRIMARY KEY, todo map<timestamp, text>); - Insert values into the newly-created
table.
INSERT INTO t (userid, todo) VALUES ('a', {'2013-09-22T12:01:00.000+0000': 'text'}); - The Snap displays the following
exception:
SELECT userid, todo FROM t;
The Snap displays the following exception:
com.datastax.driver.core.exceptions.CodecNotFoundException:
Codec not found for requested operation: [timestamp <->
java.sql.Timestamp]
Behavior change
The jOOQ upgrade for Cassandra Snap Pack done as part of
436patches25597 resulted in the following behavior changes:- Previously, when TTL (time to live) was queried using a Select statement without specifying it during data insertion or update, the Cassandra Snaps would display ‘0’. Now, they return ‘null’ in such cases.
- Previously, the null values were stored as ‘0’ in the INT datatype columns, now they are stored as ‘null’.
Behavior changes after the Cassandra driver upgrade (3.x to 4.x):
The Cassandra driver upgrade resulted in the following behavior changes in error handling and metadata:
- Error messages and exception class names may differ compared to the previous
driver (package changes from
com.datastax.driver.core.exceptions.*tocom.datastax.oss.driver.api.core.servererrors.*). - Table output schema metadata (column order and reported column size) may differ from earlier releases due to the upgraded driver and underlying metadata APIs.
- Known limitation – TIME type milliseconds: When working with the Cassandra TIME data type, milliseconds may not be preserved in certain scenarios because of limitations in the Cassandra JDBC wrapper used by the Snap Pack. For reference, see Issues · ing-bank/cassandra-jdbc-wrapper.