KX Community

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

Home Forums kdb+ How to instantly recognize schemas added to Ticker in HDB

  • How to instantly recognize schemas added to Ticker in HDB

    Posted by k-mambo on February 2, 2023 at 12:00 am

    A new table has been added to the KDB Ticker for new functionality in the system.

    However, HDB cannot know information about the new table unless RDB saves memory data as an End of Day file.

    Is there a good way?

    k-mambo replied 8 months, 2 weeks ago 2 Members · 1 Reply
  • 1 Reply
  • rocuinneagain

    Member
    February 3, 2023 at 12:00 am

    If you only have partitioned tables in your HDB you could load in the ticker schema file followed by reloading the HDB. Any existing tables in the HDB will be reloaded as normal and for your remaining in memory only tables loaded from the schema file you can add a dummy date column as a placeholder.

     

    \l sym.q l /path/to/HDB {update date:.z.d from x} each tables[] where not tables[] in .Q.pt

     

    Really in practice I would avoid this.

     

    The best way is to just add empty tables for the new table to the DB and then call l again as normal

    https://github.com/KxSystems/kdb/blob/master/utils/dbmaint.md#addtable

    You will want this anyway long term to prevent queries failing if older partitions are missing.

     

Log in to reply.