Python UDF

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.



  • Options
    Abhishek_RanaAbhishek_Rana Vertica Employee Employee
    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 .
  • Options
    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.
  • Options
    Abhishek_RanaAbhishek_Rana Vertica Employee Employee
    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:


  • Options
    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.)

  • Options
    Thanks, Adam. We have already tried C++ route. Will give the R route a try as well.
  • Options


    What is the statu8s Today of Python or Ruby UDF ?




Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file