Cassandra从一个桌子复制n行,然后将它们插入另一个表格

发布于 2025-01-29 05:37:39 字数 143 浏览 6 评论 0原文

我需要将第一个100K记录从“ prod”键空间复制到卡桑德拉(Cassandra)的“测试”键,我尝试使用dsbulk,但它导出了整个表数据,并且需要更长的时间。

是否有任何解决方案可以从一个表中获取100k记录并将其复制到Cassandra的另一个表中?

I need to copy the first 100k records from "prod" keyspace to "test" keyspace in Cassandra, I tried to use dsbulk but it export the whole table data and it is taking longer time.

Is there any solution to fetch 100k records from one table and copy them into another table in Cassandra?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你列表最软的妹 2025-02-05 05:37:39

下载/install

然后使用以下命令将数据从表卸载到CSV文件

dsbulk unload -url/tmp/export/-query/Query“从prod.user limit限制100000”>

Download/ install dsbulk dsbulk package and update the variable $PATH value with dsbulk bin folder and then update the ./.bashrc file.

Then use the below command to unload the data from the table to csv file

dsbulk unload -url /tmp/export/ -query "SELECT * from prod.user LIMIT 100000"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文