I have tried like 8 different pyspark/python -> Cassandra drivers (including JDBC) and I just can't connect. I get this:
>>> session.execute(''' SELECT * mykeyspace.foo ''').default_consistency_level=ConsistencyLevel.ANY
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'ConsistencyLevel' is not defined
>>> session.execute(''' SELECT * mykeyspace.foo ''').consistency_level=0Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "cassandra/cluster.py", line 1572, in cassandra.cluster.Session.execute (cassandra/cluster.c:27084)
File "cassandra/cluster.py", line 3133, in cassandra.cluster.ResponseFuture.result (cassandra/cluster.c:60157)
cassandra.protocol.ProtocolException: <ErrorMessage code=000a [Protocol error] message="Unknown code 10 for a consistency level">
I tried pulling the python-driver code down from git and building it locally but still get the same error.
I have spent like a million hours on this.