prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
16.04k stars 5.37k forks source link

Using Function created in a database that Presto is pointing to #14579

Open aayush27894 opened 4 years ago

aayush27894 commented 4 years ago

Hello, I have created a pl/python function in a database that Presto is pointing to. Presto however, doesn't recognize the created function. Getting "Function Not Registered Error".

I realized, with Presto I need to first register the UDF as a JAR file. My question is if there is a way to get a pl/python or pure python function be called in and used by the presto CLI?

rongrong commented 4 years ago

Presto does not support python functions for now.

aayush27894 commented 4 years ago

How do I use a custom function is Presto? Apologies if this is a question that has been answered. But I didn't see much help out there for custom functions.

Would you recommend this project for registering a UDF. https://github.com/qubole/presto-udfs

If not where could I start?

rongrong commented 4 years ago

If you want to add udfs to Presto, you can implement a functions plugin. You can look at presto-geospatial plugin for example.

aayush27894 commented 4 years ago

Sounds good. Thank You.

aayush27894 commented 4 years ago

is there a way to create and use functions locally with Presto? Would I necessarily have to register the function with Presto git community?

rongrong commented 4 years ago

You can do that in your own git repo. It can be private if you don't want to share.