Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

java udx getuser()

I am writing a java udx and was wondering if it is possible to determine userid running the udx. If so can you please provide an example?

Was looking at srvInterface but did not see any methods.

public void processBlock(ServerInterface srvInterface, BlockReader arg_reader, BlockWriter res_writer)
throws UdfException, DestroyInvocation {

        do {
            srvInterface.log("processBlock begin");
                     } while (;       



  • Jim_KnicelyJim_Knicely Administrator
    edited January 2018


    What kind of UDx are you creating? If it's a scalar function maybe you can use Vertica's CURRENT_USER() function to pass the user name as a parameter to your function?

    SELECT your_java_udx (CURRENT_USER(), colA, colB, etc.)
    FROM some_table;

Leave a Comment

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

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.