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 (arg_reader.next());       

Thanks

Comments

  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited January 2018

    Hi,

    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
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file