cancel
Showing results for 
Search instead for 
Did you mean: 

What does the w dictionary look like in a tick set up?

Mannix
New Contributor III
New Contributor III

init:{w::t!(count t::tables`.)#()}

I know w begins life as a dictionary with the keys being the symbols of the table names and the values being empties: ()

What does the w dictionary look like after the tickerplant runs, subscribers join etc?


1 ACCEPTED SOLUTION

eteague
New Contributor II

The .u.w dictionary is a dictionary of table names and (handle;subscribed syms). Timestored have a tutorial on tick with the example:
q).u.w
quote | ()
trade | ,(396;`IBM`AA )

Here there is one subscription to the trade table for the `IBM and `AA symbols on handle 396 and no subscriptions to the quote table. The link to the Timestored tutorial is here:
Kdb Tick Data Storage » Kdb+ Tutorials (timestored.com)

Here's a guide to helping start kdb+ tick:

Realtime database – Starting kdb+ – Learn – kdb+ and q documentation - Kdb+ and q documentation (kx....

It may be beneficial for you to try starting tick with a couple of different rdb processes and try different variations using .u.sub. In standard tick the rdb subscribes to all tables and all syms, using .u.sub[ ` ; ` ], but you can change this to subscribe to specific tables/syms. The first argument is the table name the second is the list of syms you want to subscribe to. For the example above it would look like:
.u.sub[`trade;`IBM`AA]
It may be helpful for you to see for yourself. 

Hope that helps.




`

View solution in original post

1 REPLY 1

eteague
New Contributor II

The .u.w dictionary is a dictionary of table names and (handle;subscribed syms). Timestored have a tutorial on tick with the example:
q).u.w
quote | ()
trade | ,(396;`IBM`AA )

Here there is one subscription to the trade table for the `IBM and `AA symbols on handle 396 and no subscriptions to the quote table. The link to the Timestored tutorial is here:
Kdb Tick Data Storage » Kdb+ Tutorials (timestored.com)

Here's a guide to helping start kdb+ tick:

Realtime database – Starting kdb+ – Learn – kdb+ and q documentation - Kdb+ and q documentation (kx....

It may be beneficial for you to try starting tick with a couple of different rdb processes and try different variations using .u.sub. In standard tick the rdb subscribes to all tables and all syms, using .u.sub[ ` ; ` ], but you can change this to subscribe to specific tables/syms. The first argument is the table name the second is the list of syms you want to subscribe to. For the example above it would look like:
.u.sub[`trade;`IBM`AA]
It may be helpful for you to see for yourself. 

Hope that helps.




`