Search code examples
kdb

Command to check partitioned directory in KDB


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?


Solution

  • 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.

    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.