DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

abhishekpareek avatar image
abhishekpareek asked ·

Cannot query a C* 1.2.19 table with Python driver, "This operation is not supported for Super Columns"

Hi guys,

I'm a cassandra noob who have recently inherited an 8+ year old cassandra 1.2.19 cluster, which needs upgrading. However, at the moment I'm taking some time to read cassandra docs to get myself acquainted with the inner workings of it and playing around.

My question is about querying (select *) one of the tables, which fails. I know that I should rather be using predicate filters with partitioning and clustering columns but I don't have access to the frontend tornado web server accessing the cassandra db plus I'm just testing waters to figure out what is and is not possible with this version of cassandra. Details as follows -

KEYSPACE -

 CREATE KEYSPACE bigbox WITH replication = {                                                                                                                                                                 'class': 'SimpleStrategy',                                                                                                                                                                                 'replication_factor': '3'                                                                                                                                                                                };

TABLE -

CREATE TABLE "Databases" (  
"KEY" blob,  
column1 ascii,  
value blob,  
PRIMARY KEY ("KEY", column1)) 
WITH COMPACT STORAGE AND  
bloom_filter_fp_chance=0.010000 
AND  caching='ROWS_ONLY' 
AND  comment='' 
AND  dclocal_read_repair_chance=0.000000 
AND  gc_grace_seconds=864000 
AND  read_repair_chance=1.000000 
AND  replicate_on_write='false' 
AND  compaction={'class': 'SizeTieredCompactionStrategy'} 
AND  compression={'chunk_length_kb': '64', 'sstable_compression': 'SnappyCompressor'};

However when I try to do a select * through the python datatax cassandra driver I get the following error -

cassandra.cluster.NoHostAvailable: ('Unable to complete the operation against any hosts', {<Host: 192.168.114.84:9042 datacenter1>: ConnectionException('Host has been marked down or removed'), <Host: 192.168.114.82:9042 datacenter1>: <Error from server: code=0000 [Server error] message="java.lang.UnsupportedOperationException: This operation is not supported for Super Columns.">, <Host: 192.168.114.81:9042 datacenter1>: <Error from server: code=0000 [Server error] message="java.lang.UnsupportedOperationException: This operation is not supported for Super Columns.">, <Host: 192.168.114.83:9042 datacenter1>: <Error from server: code=0000 [Server error] message="java.lang.UnsupportedOperationException: This operation is not supported for Super Columns.">})

Here is the relevant python code snippet - python 3.8.2, latest datastax cassandra driver

log.info("setting keyspace...")
session.set_keyspace(KEYSPACE)
query = 'SELECT value FROM "{0}"'.format(TABLE)
statement = SimpleStatement(query, fetch_size=10)

If I use a single column like column1 - 'select column1 from "Databases"' - I get results.

* can anyone let me know what *might* be going wrong in here?

* and is there a way I can get around this problem?

Thanks in advance!

python driverthrift
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

Super Columns (old Thrift format) were deprecated in Cassandra 2.0 CQL and are not supported.

You will need to query the old table using a Thrift driver. Cheers!

[UPDATE] I've confirmed from checking the code, SuperColumn.java in C* 1.2.19 does not support returning a value.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.