Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对列式数据库比较陌生,请原谅无知。假设我有 1,000,000 列。我想返回这些列中 10% 的随机样本(即 c0、c10、c20...c999,980、c999,990)
在 HBase 中,他们有列过滤器,我可以编写一个列过滤器,每十个结果返回一次。我可以在 Pycassa/Cassanda 中执行此操作吗?
谢谢
您可以使用 Pycassa 在客户端轻松完成此操作,但 Cassandra 不支持服务器端过滤。
服务器端唯一可以做的就是切片。因此,您可以从 column=C10 limit=10 开始阅读以获取第 10-19 列。或者您可以要求特定列,因此如果您知道有多少列,您可以手动要求每 10 列。