卡桑德拉选择性复制

编程入门 行业动态 更新时间:2024-10-13 04:23:30
本文介绍了卡桑德拉选择性复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想将选定的行从列族复制到.csv文件。复制命令仅可用于将列或整个表转储到不带where子句的文件中。有没有一种方法可以在复制命令中使用where子句?

I want to copy selected rows from a columnfamily to a .csv file. The copy command is available just to dump a column or entire table to a file without where clause. Is there a way to use where clause in copy command?

我想到的另一种方法是

插入到table2()值中( select * from table1 where< where_clause> );然后将table2转储到.csv,这也是不可能的。

Do "Insert into table2 () values ( select * from table1 where <where_clause>);" and then dump the table2 to .csv , which is also not possible.

任何帮助将不胜感激。

推荐答案

没有在副本中制作where子句的方法,但是可以使用此方法:

There are no way to make a where clause in copy, but you can use this method :

echo选择c1,c2...。FROM keySpace.Table where; | bin / cqlsh> output.csv

echo "select c1,c2.... FROM keySpace.Table where ;" | bin/cqlsh > output.csv

它允许您将结果保存在output.csv文件中。

It allows you to save your result in the output.csv file.

更多推荐

卡桑德拉选择性复制

本文发布于:2023-10-27 10:46:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1533146.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:选择性   卡桑德拉

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!