KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy What does the w dictionary look like in a tick set up?

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

    Posted by mannix on March 15, 2022 at 12:00 am

    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?

     

    mannix replied 3 months, 3 weeks ago 2 Members · 1 Reply
  • 1 Reply
  • eteague

    Member
    March 15, 2022 at 12:00 am

    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.com)

    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.

    `

Log in to reply.