This could be done by modifying how the WDB writes intraday to allow a single intraday process that loads in what the WDB writes. The data currently can't load due to the structure that it is saved in. An option for this process would be to restructure this data using integers as partitions instead of date with each sym mapped to an integer. The EOD merge logic would need adjusted to use this method as well as the intraday save logic. The mapping of syms to integers would need handled: using the existing enumerations would be the simplest approach to this. Also, queries would need to include a "where int=..." clause for efficiency. The new structure is shown below:
Current Structure:
/wdb
/date
/trade
/sym1
/sym2
/quote
/sym1
/sym2
New Structure:
/wdb
sym
/0
/trade
/quote
/1
/trade
/quote
We wouldn't recommend following the steps in the link as this repository uses undocumented processes that shouldn't be replied upon in a production system.
Thanks,
James
Hi Jeremy,
Yes, what is lost from the current structure is the potential for the data to be parted by multiple syms.
The linked blog post explains a way to work around this drawback of the new structure. The blog linked discusses encoding multiple pieces of data in an int partition, for example, to encode sym and exchange for each int, instead of just the sym. However, implementing this would add additional complexity to the logic required to be added to the WDB.
kdb+ IoT Database Structure | AquaQ
Thanks,
James