How to write data into table from python to kdb+ on Refinery?

Hi

   I need to write data in to a table using python.

I used UDF before, but cant make it work now?

 

how to do it?

Thanks

Ori

Hi Ori,
Please find some reference information here for writing a Python UDF for Refinery: Realtime UDF (kx.com).

Kind regards,

David

Thanks David

   I have to understand how to  make it active on background every 300 milliseconds.

my inquiry is more for integrating python udf as a call-back / event handler to timer tick.

   Actually I have to connect a consistent data source to kdb+ , using python. I have 

python programs to get data from data sources but don’t know how to:

  1. use an event handler to accept the data and push it to a kdb+ refinery data base.

  2. setup multiple sources to update the same data base and write it to HDB at end of day. 

 

do you know how to do it?

Thanks

Ori

Hi Ori,

I’m not too familiar with this use case, however I hope someone in the Community will be able to give some advice
Best regards,
David

Hi Ori,

In my experience UDFs are used for reads, not writes. Your problem sounds more suited to PyKX. With that you can convert your python data into kdb+, and publish to the Refinery TP (see Refinery architecture diagram Architecture (kx.com), your python process(es) act as feedhandlers).

Thanks,

Eoghan