2022.05.05 12:04 AM
Hi,
I have created the new table "tradeContext" as part of Capstone Project. I can see its successfully created and holds expected data. However, the test 3.1 is keep failing with the below error. How can we check what is exactly causing this error and resolve?
3.1 Looking only at the last date in our database, create a new table tradeContext
which has all the trade
table information. This should have two extra columns - bid
and ask
- which contain the nbbo
information for that particular trade option_id
as at that trade time.
--> Error
>> exercise3.1 Fail "abort" "abort in before block due to error \"date\""
2022.05.05 08:53 AM
The database at /dbs is a date partitioned one meaning the partition domain (date in this case) is a virtual column and only visible when the database it loaded into memory. The method you have used is loading each partition separately.
To load/map the entire database in correctly you can use \l , for more resources for beginners to kdb+ databases and quick tips on working with them check out Q4Mortals
\l /dbs/
2022.05.05 02:11 AM
Hi Venu,
The error is on the date column - check does it exist in your tradeContext table and is called date?
>> exercise3.1 Fail "abort" "abort in before block due to error \"date\""
Thanks,
Michaela
2022.05.05 04:04 AM
Hi Michaela,
Thanks for the quick reply. I just double checked. As per the following console output, the column name "date" of type "d" exist in tradeContext table and seems right.
Venu
2022.05.05 04:10 AM
The structure does seem ok at a glance.
One thing it might be is this 3.1 test does have a dependency on the trade table remaining unchanged :
q)meta trade
c | t f a
---------| -----
date | d
option_id| s p
trade_id | C
time | t
price | f
qty | j
side | s
edge | f
exch_id | j
broker_id| j
If that also looks correct on your side can you please share your definition of tradeContext so I can further assist?
Thanks
2022.05.05 08:36 AM
The trade table does not have column called "date". I have loaded trade table using the below command. Please advise if I am missing something.
`:/dbs/2020.08.03/trade`:/dbs/2020.08.03/trade`:/dbs/2020.08.04/trade`:/dbs/2020.08.05/trade`:/dbs/2020.08.06/trade
I have added date field to tradeContext separately using the following code.
tradeContext:select date:date:2020.08.06+500?1,option_id,trade_id,time ,price,qty,side,edge,exch_id,broker_id,bid,ask from aj[`option_id`time;trade;nbbo]
thanks
2022.05.05 08:53 AM
The database at /dbs is a date partitioned one meaning the partition domain (date in this case) is a virtual column and only visible when the database it loaded into memory. The method you have used is loading each partition separately.
To load/map the entire database in correctly you can use \l , for more resources for beginners to kdb+ databases and quick tips on working with them check out Q4Mortals
\l /dbs/
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.