KX Community

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

Home Forums kdb+ Q chk cannot work

  • Q chk cannot work

    Posted by renbright on August 14, 2023 at 12:00 am

    I added another two new columns to the existing kdb table and use Q chk to back fill the HDB. But somehow, no data was back filled and still got error when query HDB.


    how to fix this?

    renbright replied 2 months, 3 weeks ago 3 Members · 4 Replies
  • 4 Replies
  • rocuinneagain

    August 14, 2023 at 12:00 am

    .Q.chk adds missing tables, not missing columns.



    Use addcol in kdb/utils/dbmaint.md to add columns.

    Note: this will write to all partitions so ensure you do not overwrite valid data.



    add1col can be used instead to choose which partitions to write to.

  • gyorokpeter-kx

    August 14, 2023 at 12:00 am

    Do you see the files for the new columns on disk?

    Did you make sure to reload the database with l after the .Q.chk is done?

  • renbright

    August 14, 2023 at 12:00 am

    Yes, I added new columns yesterday and can see it RDB. Today, I can see new data in yesterday HDB. But can not get HDB back fill using Q chk.


    any suggest?

  • renbright

    August 14, 2023 at 12:00 am

    Thanks for your reply:

    1. I did have new table added at the same time. it seems the new table can be back-filled;

    2. addcol works for that, but each time only add one column. do you know how to add multiple columns one time?

Log in to reply.