如何使用 python 或直接通过 cqlsh 将 Cassandra 表数据提取到 json 文件中?
我想将 Cassandra 中的表中的数据导出到 json 文件。
I want to export the data from a table in Cassandra to json file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 CQL,您实际上可以在
SELECT
之后使用JSON
关键字。如果您使用 cqlsh 的-e
标志从命令行运行查询,则可以将输出重定向到文件,如下所示:With CQL, you can actually use the
JSON
keyword after theSELECT
. If you use cqlsh's-e
flag to run the query from the command line, you can redirect the output to a file, like this: