我想从 Cassandra 导出数据到 Json 文件,因为 Pentaho 不支持我的 Cassandra 3.10 版本
最佳答案
您可以在 select
之后简单地添加 json
以获取 json 格式的结果:
cqlsh:cycling> select json name, checkin_id, timestamp from checkin;
[json]
------------------------------------------------------------------------------------------------------------------
{"name": "BRAND", "checkin_id": "50554d6e-29bb-11e5-b345-feff8194dc9f", "timestamp": "2016-08-28 21:45:10.406Z"}
{"name": "VOSS", "checkin_id": "50554d6e-29bb-11e5-b345-feff819cdc9f", "timestamp": "2016-08-28 21:44:04.113Z"}
(2 rows)
取自https://docs.datastax.com/en/cql/3.3/cql/cql_using/useQueryJSON.html
关于python - 如何使用 Python 或其他语言将数据从 cassandra 导出到 Json 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45607301/