2016-10-13 3 views
0

cassandraデータベースにアクセスするためにcassandrapython cqlengineを使用しようとしていますが、列がリストタイプでないときにフィルタリングできました。あなたはcqlengineの非常に古い(非推奨)バージョンを使用しているように見えますcqlengineのpythonモデルを使用してcassandraからデータを取得できません:

d =cClass().filter(lastname='text',age=2,input__contains='a') 

Traceback (most recent call last): 
File "/usr/local/lib/python3.4/dist-packages/cqlengine-0.21.0-py3.4.egg/cqlengine/operators.py", line 43, 
    in get_operator KeyError: 'CONTAINS' During handling of the above exception, another exception occurred: 
Traceback (most recent call last): 
File "<stdin>", line 1, in <module> 
File "/usr/local/lib/python3.4/dist-packages/cqlengine-0.21.0-py3.4.egg/cqlengine/models.py", line 562, in filter 
File "/usr/local/lib/python3.4/dist-packages/cqlengine-0.21.0-py3.4.egg/cqlengine/query.py", line 507, in filter 
File "/usr/local/lib/python3.4/dist-packages/cqlengine-0.21.0-py3.4.egg/cqlengine/operators.py", line 45, 
    in get_operator **cqlengine.operators.QueryOperatorException: contains doesn't map to a QueryOperator** 
+0

これをご覧ください:http://stackoverflow.com/questions/25076283私はそれが同じ問題だと思います。 – rajpy

答えて

0

は、私は、次のエラーメッセージが表示されます。できる場合は、APIがcontainssince version 3.1.0をサポートしているDataStax driverと統合されたバージョンにアップグレードしてください。

関連する問題