Showing posts with label UDF. Show all posts
Showing posts with label UDF. Show all posts

2013/05/02

SQL UDF support since Teradata 13.10

here is a good news for the guys who's poor at c or java, like me

at past, when talked about UDF in Teradata , the only choice is C or Java.

since Teradata 13.10, a new feature is supported:SQL UDF

sample:


CREATE FUNCTION test.MyUDF2 (d INT, e INT, f INT)
RETURNS INT
LANGUAGE SQL
CONTAINS SQL
DETERMINISTIC
COLLATION INVOKER
INLINE TYPE 1
RETURN d + e + f;


2013/01/28

install,replace,remove jar on teradata


call sqlj.install_jar('CJ!/home2/tableudf/hdfsudf.jar', 'hdfsudf', 0); 
call sqlj.replace_jar('CJ!/home2/tableudf/hdfsudf.jar', 'hdfsudf'); 
call sqlj.remove_jar('hdfsudf',0); 

of course, to run the above content, appropriate accsess rights were needed

installed Jar will be shown in dbc.tables as tablekind 'D'

teradata's procedure really sucks