API / function to flush IHDB?

https://learninghub.kx.com/forums/topic/api-function-to-flush-ihdb

Hello again,

Is there a function that I can call from an IHDB process (or even from the LR) to flush it to the HDB?

The background is:

  • my EOD time is 10 am

  • I had some data on my IDHB on 26/07/2021 around 2pm

  • But then, my machine was not running on 27/07/2021 at EOD time, therefore the data still exists on the log files but obviously not in the HDB.

So how do I flush that data from the logs to the HDB?

Cheers,
Adriano

Hi Adriano!

This is an issue not only in IHDBs but RDBs i.e. if EOD is missed due to downtime then not only is the old data never pushed to HDB but it’s no-longer loaded to the RDB (because a new log file is made).

As a custom solution to this issue you could

  • check for this scenario on startup
  • playback the previous log file (I'm not very familiar with IHDBs but I imagine there's an equivalent) https://code.kx.com/q/kb/replay-log/
  • EOD with the appropriate date
Obviously this falls apart when the process is off for more than a day (you could loop through each missed log file I suppose), but hope that helps!

Josh