kdb

(kdb+/q) Configuring your data with tickerplant


I'm using the tick.q file found here https://github.com/KxSystems/kdb-tick/blob/master/tick.q

I'm loading a bunch of csvs into q instance with the script below. Despite opening port to my tp the data isn't being sent to it correctly. I'm a bit stuck on how to send data via the tp when you are loading in bulk csv data as opposed to streaming data in real time.

So I essentially have all the data correctly loaded in table format on the feed instance but bit stuck as to what to do next. Can anybody offer any guidance on how to configure this?

feed.q

h:hopen`::5010

fPath:{.Q.dd [`:/Users/dt/hb/rpcoreData/histData/csvs]x}'[key `:/Users/dt/hb/rpcoreData/histData/csvs]
fPath1:{.Q.dd[x] each key x}'[fPath]
rpr:raze {("**************************";enlist",") 0: read0 each x}'[raze fPath1]

i:0
feed:{if[count[rpr]>=i;(neg h)(`.u.upd;`rpr;value rpr i);i+:1]}
.z.ts:feed

\t 100

\l /Users/dt/hb/ht/parse_scripts/parserp.q

Solution

  • You're publishing data asynchronously and don't flush the output queue. I believe it might have to do with that. However, you should send the data synchronously from the feed to the TP. You can see an implementation of a simple feedhandler here https://code.kx.com/q/wp/rt-tick/#feedhandler-fh and you can read more about how tick.q works here https://www.defconq.tech/docs/tutorials/tick Hope this helps