Monday, 8 June 2015

How to install UDF functions on Netezza?


How to install an user defined function (UDF) in netezza?


Lets says you have got hold of the UDF function from netezza and want to install it then the below steps would help. In the example below, reverse function is installed on netezza server.


How to install UDF functions on Netezza?


 In the folder where you have placed the tgz file execute the below instruction.

[netezzahost]$ gunzip reverse.tgz
[netezzahost]$ tar -xvf reverse.tar

[netezzahost]$ cd reverse

[netezzahost]$ ./install <databasename>

CREATE FUNCTION
Created udf
Done


After this step you might have to execute grant command to provide permission on the function to the users.

For example:

grant execute on reverse to <mygroup>;


Login to database and test the function:

select reverse('mydog');
 REVERSE
---------
 godmy
(1 row)