Hi Stefan:
Thanks for the reply. I created a UDF which returns a table, however when I try to run the function I get the following error -
Error: Embedded Python is enabled but an error was thrown during initialization. SQLState: PY000 ErrorCode: 0
I have Python 2.7.5 installed on CentOS 7.4
Adam
-----Original Message----- From: users-list [mailto:users-list-bounces+adam.doherty=esso.ca@monetdb.org] On Behalf Of Stefan Manegold Sent: Thursday, June 14, 2018 02:39 To: Communication channel for MonetDB users users-list@monetdb.org Subject: Re: pymonetdb or Python UDF
Hi Adam,
if you know how to do it (efficiently) in Python, it's merely a matter of wrapping that Python code into a suitable Python UDF; cf., https://www.monetdb.org/blog/embedded-pythonnumpy-monetdb
Alternatively, you could consider using a (JIT-compiled) C(/C++) UDF; cf., https://www.monetdb.org/node/437
Best, Stefan
----- On Jun 13, 2018, at 6:31 PM, Doherty, Adam adam.doherty@esso.ca wrote:
Hello all:
This is more of curiosity but I have data in my events table currently trapped in a nvarchar field.
I am wondering if I can build a table and do execute a select into with a python UDF pulling data from the existing fields plus the values of my nvarchar field.
My string data has the following format –
“key1=value, key2=val, key3=value”…
I want to break out the data first by splitting on the , and then the =
Keys would be the columns in the table.
I can do this with a python script and pymonetdb but a UDF would be faster.
Adam Doherty
Process Control Systems Administrator
Kearl Technical, Imperial
505 Quarry Park Blvd SE
W3B.224
Calgary, AB T2C 5N1
adam.doherty@esso.ca P 587.476.4640 M 403.869.1636
imperialoil.ca | Twitter | YouTube
users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list