问题描述
我正在运行一个"q"服务.我想检查服务中的当前目录是否为分区目录.有命令执行此操作吗?
I have one 'q' service running. I want to check whether current directory in the service is a partitioned directory or not. Is there any command to do that?
推荐答案
https://code.kx.com/q/ref/dotq/#qpf-partition-type 或其他.Q之一应为您完成此操作( https://code.kx.com/q/ref/card/#q ).尽管KX不一定建议使用.Q实用工具.
https://code.kx.com/q/ref/dotq/#qpf-partition-type or one of the other .Q's should do it for you (https://code.kx.com/q/ref/card/#q). Though KX don't necessarily recommend using .Q utilities.
另一种方法是检查是否存在变量"date"(如果日期已分区),该变量列出了可用的分区日期.假设在此过程中没有创建随机的,不相关的全局日期"变量.
Another way would be to check for the existence of the variable "date" (if date-partitioned), which lists the available partitioned dates. Assuming there hasn't been a random unrelated global "date" variable created in the process.
这篇关于检查KDB中分区目录的命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!