問題タブ [thingsboard]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
603 参照

python - Python cassandra-driver で特定の UUID を照会できない

Python パッケージ cassandra-driver を使用して、cassandra データベースから特定の値を抽出しようとしています。私はデータ構造に影響を与えません。

私のPythonスクリプト

次の出力が得られます。

私が今やりたいのは、この種のクエリです:

これにより、次のエラーが表示されます。

cassandra.InvalidRequest: サーバーからのエラー: code=2200 [Invalid query] message="関数 system.uuid の呼び出しで引数の数が無効です: 0 が必要ですが、1 が指定されました"

クエリがシステム関数を呼び出しているようuuidです。entity_idが のタイプであることはわかっていuuidますが、 を使用してクエリにこれを含める方法がわかりませんsession.execute

私が使用した:

  • カサンドラ バージョン 3.11.2

  • Python バージョン 3.6.3

どんなアイデアでも大歓迎です!ありがとう。