KDB +tick - updates not flowing from ticker plant to RDB

687 views Asked by At

I am new to q and KDB. For testing I have KDB 3.4 setup on my local windows PC with both tickerplant and RDB running at default ports and using vanilla tick.q, u.q and r.q.

I have a Java process which connects to ticker plant and executes

".u.upd:insert" once followed by multiple update queries like below

".u.upd[`Offers ; ( 2016.12.20D11:43:08.212,`655044AE5,`CITIXX,`CITIXXX74,`CITIXXX,`CITIXXX74,2545,`SELL,`SUBJECT,`OPEN,`PRICE,101.693e,200j,1j,2016.12.20D11:43:08.212)]"

I do see the Offers table being updated in ticker plant (localhost:5010) but I don't see any of these being published to RDB (localhost:5011) although it has the schema of the table being updated. Also if the java process connects to RDB directly then I do see the updates in RDB but I would like to understand why the updates are not being published from ticker plant to RDB with my current setup.

2

There are 2 answers

0
Paul Kerrigan On

It seems as though you have not yet subscribed to the tickerplant from the rdb process - try running .u.sub[`Offers;`] from the rdb to the tickerplant handle.

More information on kdb+ tick can be found at http://code.kx.com/q/tutorials/startingq/tick/

1
dstrachan On

The issue here is that you are actually redefining the .u.upd function which should take care of several things:

  • Check if EOD needs to be run
  • Check for a timestamp on the incoming data and add one if missing
  • Build a table from the incoming data and publish to downstream subscribers
  • Log upd call for RDB recovery

By redefining .u.upd you are missing the crucial step of publishing the data, keeping the default definition should help solve your issue.