cancel
Showing results for 
Search instead for 
Did you mean: 

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

Kovacsi
New Contributor III

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

1 ACCEPTED SOLUTION

eohara
New Contributor III
New Contributor III

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

View solution in original post

4 REPLIES 4

davidcrossey
Moderator Moderator
Moderator

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

Kind regards,

David

Kovacsi
New Contributor III

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

eohara
New Contributor III
New Contributor III

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