cancel
Showing results for 
Search instead for 
Did you mean: 

.Q.dpft

analyst_tech_jo
New Contributor
The question is on .Q.dpft and db layout. 1. Is the difference between #g and #p is that internally a hashtable is maintained of unique values to each index of the value in the column for #g while #p maps unique value to the first index of the value ? 2. Dont quite get the definition of .Q.dpft. If a virtual column (invisible column date) is actually partioning the table, then how is the column f in dpft again having attribute #p ? It wont work because a specific partition per col f might be split across two partitions.
2 REPLIES 2

LamHinYan
New Contributor
A1
`g# maps each unique value to a list of pointers to all appearances. The list is not necessarily sorted nor partitioned.
`p# maps each unique value to a pointer to the first appearance. The list is partitioned. A sorted list is a partitioned list. A partitioned list MAY NOT be sorted.

A2
dpft[directory;partition;`p#field;tablename]
dir: directory above the date directories
partition: date directory, virtual column
`p#field: refers to the structure of the sym column
table: key to a table in the global namespace

Himanshu
New Contributor II
kdb+ pulls the date column from the directory structure. This is why you don't need to save the date column. 

p#field is not for partition but for parted attribute that is applied on the field (usually the `sym column).