cancel
Showing results for 
Search instead for 
Did you mean: 

Capstone Project Issue | 3. Data Analytics and Reporting

venu
New Contributor II

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\""

1 ACCEPTED SOLUTION

Michaela
Community Manager Community Manager
Community Manager

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 

Spoiler
\l /dbs/

View solution in original post

5 REPLIES 5

Michaela
Community Manager Community Manager
Community Manager

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

venu
New Contributor II

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_0-1651748278152.png

Venu

Michaela
Community Manager Community Manager
Community Manager

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

venu
New Contributor II

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

venu_0-1651762744836.png

 

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

Michaela
Community Manager Community Manager
Community Manager

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 

Spoiler
\l /dbs/