cancel
Showing results for 
Search instead for 
Did you mean: 

API / function to flush IHDB?

adrianosm_
New Contributor III

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

3 REPLIES 3

dataGuyJosh
New Contributor II

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

Thanks, Josh. I will have a look and come back here if I have any questions
Cheers,
Adriano

ghe
New Contributor
New Contributor

Hi Adriano,

You could call the function dxFinalRecoveryIntraday[] from LR process to explicitly flush data from IHDB to HDB.

You might need to run the following code first before calling the function:

.al.getfunction`dxFinalRecoveryIntraday