Showing results for 
Search instead for 
Did you mean: 

publish data to kdb uisng qpython

New Contributor

1.  how to push data to KDB using qpython? 

2. is there any script to push data to HDB?  assume I have lots of dated trade data, how can I push data to kdb by setting trade date as the data of HDB.




New Contributor III

1. Doing this via qpython is no different from those via other interfaces (including q itself): you open a connection (e.g. to tickerplant, assuming a tp+rdb+hdb setup) and call a function that will get your data persisted (e.g. .u.upd[`trade; data]). 


2. Generally speaking, backpopulating historical data in a right way isn't straightforward: it could be done as simple as splaying data using set, one for each partition (date), if you have complete data to write; if you've got partial data to write (e.g. trades for a new instrument type), you may have to re-sort the combined data and re-apply attributes wherever needed. The q language itself is short of higher-level APIs that handles the nuances, but I find TorQ has a good collections of those, which makes the task easier.