是否可以使用 cqlsh 获取数据分布?

is it possible to get data distribution using cqlsh?

例如:table emp (emp_id, ename, salary) 输出:类似于 Oracle 中的内容:select emp_id、ename、salary、count(*) from emp group by emp_id, ename, salary order by salary

使用 cqlsh

spark python 选项可能有帮助.. 谢谢!

通过更改数据模型并使用计数器或聚合(甚至物化视图),您可能可以解决该查询。通过使用该数据模型和 cqlsh 你不能。 Cassandra 不支持分组依据。 如果您已经拥有 Spark,那么它很有意义,您可以轻松做到。