2022.03.16 06:20 AM
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
2022.03.23 07:50 AM
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
2022.03.18 12:01 AM
Hi Ori,
Please find some reference information here for writing a Python UDF for Refinery: Realtime UDF (kx.com).
Kind regards,
David
2022.03.20 12:09 AM
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
2022.03.20 07:36 PM
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
2022.03.23 07:50 AM
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
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.