Showing results for 
Search instead for 
Did you mean: 

.Q.hdpf throws ` type Error.

New Contributor

In the kdb-tick architecture,

` Type error occurs when performing the .Q.hdpf function in the RDB process.

what should I check?


Moderator Moderator

Hi k-mambo,

A type error is a very general error, meaning it could be any number of issues.

The best place to start would be to confirm what arguments you are passing to .Q.hdpf and that each of the parameters are of the correct type as per .Q.hdpf




Additional resources:

Thanks for sharing your question on the KX Community!

Hope this helps,


parameter types being used correctly.

The details cannot be debugged because the .Q.dpft function is not at a level that can be checked.

I checked the partition table, some partitions have different column orders.

In the above case, can a type error occur?

I'm not certain, but using a simple example, column order in .d file doesn't appear to impact the operation of .Q.dpft (which is called by .Q.hdpf):

q)get hsym `$"./2021.11.25/t/.d"
q)get hsym `$"./2021.11.26/t/.d"
q)\l .
date       sym  price    qty
2021.11.25 akjl 90.30751 2
2021.11.25 amge 91.49882 33
2021.11.26 jobl 64.2737  39
2021.11.26 lfjp 38.69818 48

One can check through the definition of .Q.hdpf to see what it's doing; granted it's implemented in k), however you can see some clear parts:

k){[h;d;p;f](@[`.;;0#]dpft[d;p;f]@)'t@>(#.:)'t:.q.tables`.;if[h:@[hopen;h;0];h"\\l .";>h]}

which as per link in my initial response aligns to this statement of 3 parts:

"Saves all tables by calling .Q.dpft, clears tables, and sends reload message to HDB."

The question to ask yourself is where is it failing?

If the data is being saved to your HDB then it's getting past the .Q.dpft call. The type error could be coming from the reload, where you RDB is trying to reload the HDB via handle 'h'. Are you passing an HDB handle to your process as the first parameter, is that handle valid etc