使用dsbulk加载到CQL集返回返回“无效集合字面 - 绑定变量不支持集合文字中”。
我尝试使用DSBULK加载大量数据到一个集合中使用的表:
dsbulk load test.json \
-h cassandra-db -u ... -p ... -k mykeyspace \
-query "update mykeyspace.mytable set value_s = value_s +{:value_s} where value_1=:value_1 and value_2=:value_2"
我会收到以下错误:
Operation LOAD_20220629-122020-418911 failed: Invalid set literal for value_s: bind variables are not supported inside collection literals
如果使用
-query "update mykeyspace.mytable set value_s = value_s +{'mystaticvalue'} where value_1=:value_1 and value_2=:value_2"
负载,则按预期执行负载。有人知道我如何参数化我的svalue?
另外,我可以创建单个更新语句,然后通过CQLSH执行该语句。不幸的是,处理时间真的很慢。我有> 10亿记录要插入。
I try to load with dsbulk a huge amount of data into a table wit a set using:
dsbulk load test.json \
-h cassandra-db -u ... -p ... -k mykeyspace \
-query "update mykeyspace.mytable set value_s = value_s +{:value_s} where value_1=:value_1 and value_2=:value_2"
I get the following error:
Operation LOAD_20220629-122020-418911 failed: Invalid set literal for value_s: bind variables are not supported inside collection literals
If I use
-query "update mykeyspace.mytable set value_s = value_s +{'mystaticvalue'} where value_1=:value_1 and value_2=:value_2"
the load is executed as expected. Anyone an idea how I can parameterize my set svalue?
Alternatively, I can create individual update statements, which I then execute via the cqlsh. Unfortunately the processing time is really slow. I have > 1 billion records to insert.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,在更新CQL收集时,Cassandra不允许使用绑定变量。结果,您将无法使用 bulk loader < /a>。干杯!
Unfortunately, Cassandra does not allow the use of bind variables when updating CQL collections. As a result, you won't be able to do it with the Bulk Loader either. Cheers!