Reputation: 23
I have a KDB tickerplant setup with one RDB containing a trade and quote table subscribed to the tickerplant then another chained RDB containing an aggregation table that is performing various functions on the trade and quote data and publishing back to the tickerplant. Is there any way to save this data down rather than have it all flushed out at end of day?
Upvotes: 0
Views: 204
Reputation: 13657
Yes, you use the .u.end
function.
Every tickerplant subscriber will have .u.end
triggered at end of day when the tickerplant does its end of dy rollover. Within that function (which contains one parameter, the date which has just passed) you can create the logic to save down your table.
It sounds like you already have some sort of .u.end function in place which is flushing the table. So you will have to make sure to retain the existing behaviour along with the adding the savedown logic. The default .u.end
function for a vanilla RDB can be seen here: https://github.com/KxSystems/kdb-tick/blob/master/tick/r.q
You might be able to use that or some variant of that.
Upvotes: 0