2021.11.22 06:51 PM
In the kdb-tick architecture,
` Type error occurs when performing the .Q.hdpf function in the RDB process.
what should I check?
2021.11.22 09:03 PM - edited 2021.11.22 09:04 PM
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
.Q.hdpf[historicalport;directory;partition;`p#field]
Additional resources:
Thanks for sharing your question on the KX Community!
Hope this helps,
David
2021.11.22 10:29 PM
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?
2021.11.29 02:17 AM
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"
`sym`qty`price
q)get hsym `$"./2021.11.26/t/.d"
`sym`price`qty
q)\l .
q)t
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:
q).Q.hdpf
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
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.