Skip to main content

Python UDF

  • November 24, 2014
  • 6 replies
  • 15 views

vioravis
Forum|alt.badge.img+1
Vertica currently supports User Defined Functions in R, C++ and Java. Is there a plan to support Python UDFs? If so, could someone please clarify when to expect this functionality in Vertica.

Thank you.

Ravi

6 replies

Abhishek_Rana
Forum|alt.badge.img
  • Participating Frequently
  • November 24, 2014
Yes, for used defined functions(UDF's) there is a limitation so far in vertica for languages. In case you need to use python, I think better option will be User defined Procedures(if they solve your purpose), as those are not confined to  only R,C++ & java.

As of now, I don't have any information regarding inclusion of python support in UDF's in next major release .

vioravis
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • November 24, 2014
Hi Abhishek, Could you please provide some links for examples of User Defined Procedures, preferably written using Python or R? Could we use any of the Python packages such as pandas or NLTK in an User Defined Procedure? Thanks a lot.

Abhishek_Rana
Forum|alt.badge.img
  • Participating Frequently
  • November 24, 2014
I will try to find & share  any such example User Defined Procedure in Python . At present I can share with you the link to use & create these procedures:

http://my.vertica.com/docs/7.1.x/HTML/index.htm#Authoring/ProgrammersGuide/StoredProcedures/Creating...



Forum|alt.badge.img+2
  • Participating Frequently
  • December 2, 2014
For what it's worth:  You could write a C++ UDF that invokes a Python interpreter.  (Or a Java UDF that invokes a Jython interpreter...)

If you're up for a bigger challenge:  The source code for the R side process has been published.  Go to http://my.vertica.com/ , log in, click the "Downloads" link, and find and download "User Defined Functions in R: source package".  Swapping out the R interpreter for Python would in principle not be fundamentally hard; it's just a bunch of really-annoying gruntwork.  The result would be very unsupported, but it should give you full drop-in Python support within Vertica.

I'm aware of a couple groups who have thought about doing this.  None who've published :-)

Regarding a real solution:  If you want information about things that aren't already announced or released, I'm afraid you'll have to pin down a product manager at one of the various conventions / trade shows / conferences / hackathons / other events that we attend.  Or, if you're an Enterprise customer, file a support case asking for information.  (I'm not aware of any announcements regarding Python UDx's in Vertica.)

Adam

vioravis
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • December 2, 2014
Thanks, Adam. We have already tried C++ route. Will give the R route a try as well.

Jose_Mendez
  • New Participant
  • September 8, 2015

Dear,

What is the statu8s Today of Python or Ruby UDF ?

 

Thanks

Jose