How can a real-time subscriber get existing intraday data in the rdb for certain symbols and continue subscription on incoming data without overlaps and gaps? Thx.
You can replay the tickplant log with filtering or modify your .u.sub function to return not only an empty table schema but with data for certain symbols, i.e. subscribed symbols.
As Webster says, with a standard kdb+tick setup, the only reliable way to do what you want is to subscribe to the TP and then replay the TP log up to the received message count (the same way that the RDB recovers).
There is no way to subscribe to the TP and recover from the RDB reliably (without duplicates or gaps).
I think if you want to do that you would need to use sequence numbers in your tables e.g.
-
subscribe to the TP
-
run a recovery query against the RDB
-
filter out any TP updates which have duplicate sequence numbers
I think you could probably do it with a fairly minor change to the TP itself : if you kept a dict of
tablename!tablecount
and retrieved that upon subscription, the recovery queries against the RDB could then be
select . from table where . , i<currentcount
Thanks
Jonny