我在中有一个timestamp
列Cassandra table
,如何day of week
使用cql从timestamp列中获取列?
开箱即用不支持,但是
如果必须使用CQL,则可以查看用户定义的函数:
http://cassandra.apache.org/doc/latest/cql/functions.html
http://www.datastax.com/dev/blog/user-defined-functions-in-cassandra-3-0
http://docs.datastax.com/zh-CN//cql/latest/cql/cql_using/useCreateUDF.html
然后,您可以使用以下简单方法:
甚至像
然后,您将拥有一个UDF,它可以为您提供日期中的星期几。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句