All Forums

Covers Teradata database extensibility, including UDFs, Geospatial and Hadoop / Map-Reduce. For articles, blogs and more, see the Extensibility section of the site.

You must login to post to the forums.
Insert data into database from a UDF Topic by terausr123 06 May 2012

Hallo everybody

I would like to read a lot of images, get some information out of them and store these information into the database.

2 replies, 9 years ago
Are User defined Window Aggregates and User Defined Table Functions supported in TD 12.0? Topic by munir.bondre 27 Apr 2012 udf, window aggregate


We are developing some user defined functions (aggregates, window aggregates) and table functions  in TD 12.0.  

We tried to use the example from the "SQL External Routine Programming" book.  Unfortunately, the releasea listed on this book is 13.10.

2 replies, 9 years ago
VC++ 10 Express setup for UDF code/test Topic by JimHudd 24 Apr 2012 vc++ header libraries

Can anyone give me any help with setting up VC++ 10 please?  I've installed the IDE and need to get the Teradata headers and/or libraries available to the projects.  I'm not sure where I can install them from (part of TTU maybe?) and whether I need to do anything other than point the project build/link paths to the appropriate directories.

Thanks in advance,

Jim Hudd.

1 reply, 9 years ago
Error using TDGeoImport to load shapefile Topic by 12 Apr 2012 geospatial, st_geometry, tdgeoimport, shapefile

I am using the Geospatial Import-Export Utility (v1.6) for TD 13.0 to load shapefiles to Teradata.  When I run the utility to import a shapefile I get an error that says:

2 replies, 9 years ago
Unpacking BLOB column data which is java encrypted using an UDF Topic by vennelakanti00 19 Apr 2012


We have BLOB column which is java encrypted at application layer before loading into source db. We are bringing this data into TD. We want to unpack that data through an UDF. Is it possible to create such UDF on teradata? If so, can someone provide some input to start with?

1 reply, 9 years ago
java udf overloading "function already exist" Topic by ChWaqas 16 Mar 2012 judf, overload


Hi I want to overload the java UDFs but I am getting the "Function already exists"error even function parameters are different for both functions.


Here is how my java UDF code looks like

1 reply, 9 years ago
Formatting Bteq Output for use in Excel using XML spreadsheets Topic by egoetsch 19 Oct 2011 formatting bteq xml excel
1 reply, 9 years ago
SQL UDF replace_chars Topic by fnewbrough 20 Mar 2012 sql udf

I put together a simple sql udf to replace characters in a string. Its limited to a 55 character source string but works well.

select replace_chars( '1%223456#664', '%16#','2')



0 replies
Can an SQL UDF contain SQL in TD 13.10? Topic by jhinman732 15 Feb 2012 udf embedded sql

I would like to embed a Select statement in a UDF so that I can pop entries from a queue table into a broader query result.  Something like:

     Create FUNCTION Q_Pop1 (TxnType Char(10))

     RETURNS Integer



     SPECIFIC Q_Pop1



1 reply, 9 years ago
SQL UDF for LPAD (left-pad) giving unexpected results Topic by gpolanch 14 Feb 2012 udf, sql, create function, unexpected, lpad, left pad


Are there any doc's which discuss SQL UDF's?  (Especially the various qualifiers in the CREATE FUNCTION statement).  I am trying to determine why my regular SQL works as expected, but when you put the same code into an SQL UDF, it returns unexpected results.  Any insight would be greatly appreciated.

2 replies, 9 years ago
What is allowed in an SQL UDF? Topic by gpolanch 30 Jan 2012 udf, sql udf, replace, regexp_like, oracle replace, oracle regexp_like


1 reply, 9 years ago
UDF replaces for CHARACTER SET UNICODE Topic by MiBer 31 Mar 2010 udf

Hello all,
I'm looking for an UDF like the existing UDF "replaces", but for CHARACTER SET UNICODE (nor for CHARACTER SET LATIN). Is there anybody who can give me a correct working C-Code ?? I want to use it on an Teradata V12.


5 replies, 10 years ago
Performance of GeoSpatial UDFs on 13.10 Topic by vijaychris 10 Jan 2012 geospatial udf 13.10 13

Is there any performance improvement of GeoSpatial UDFs in 13.10 compared to 13.0 ?


0 replies
Consequences of failures of UDF in non-protected Mode Topic by gpolanch 12 Dec 2011 udf, failure, non-protected, core

As I qualified in a previous post, I'm a Teradata newbie (migrating from Oracle).   Just started writing UDF's.  I see the following Warning in the UDF Programming manual and wanted to understand this in more detail.  There are also some additional comments in the same doc section referring to core dumps, and where they are stored. 

0 replies
REGEXP_LIKE Topic by toadrw 06 Dec 2011 regexp_like(), oracle migration

Hello everybody:


In migrating from Oracle to Teradata 13, we are having difficulty finding a replacement for Oracle's REGEXP_LIKE() function.  It is our understanding that there might be a patch for this on Teradata 13.  If so, could you provide some more information on this?  If there is a UDF which might replace this function? That would also be helpful.


5 replies, 10 years ago
handling exceptions Topic by ranjan.kumar1 28 Sep 2011

I am inserting into teradata using JDBC driver for teradata. In order to process invalid data I am trying to catch the error the executeBatch method in the driver gives. See below-

1 reply, 10 years ago
teradata jdbc driver insert Topic by ranjan.kumar1 19 Sep 2011


I am able to insert data into teradata using the jdbc driver -

I am using it in a Map-reduce program (Hadoop)

when I use increasing number of inserts i get the follow error (although for smaller sets of data it works fine) can you help me understand what can go wrong?

1 reply, 10 years ago
where can i find UNICODE versions of Teradata UDFs for popular Oracle functions. Topic by sameties 11 Sep 2011

UDF examples in Extensibility Downloads can only be created in LATIN, is there any version for UNICODE

0 replies
Error: Joining on Geo Point Topic by Troyf 08 Sep 2011 geospatial, join, index, st_geometry

I am relatively new to using geo functions but I want to make sure my places dimension table does not have any duplicates by doing a delta operation from the freshly geocoded records in my staging table.  First, I attempted to do a left outer join on the point_geo column:

0 replies
Publish_XML_LOB fails with cli error Topic by rayedmond 01 Sep 2011 xml

I am attempting to publish an XML document and I am getting the following error:

CALL Failed. 7504: in UDF/XSP/UDM SYSXML.PUBLISH_XML_LOB: SQLSTATE U0036: Fetch result set error, cli request error!errorcode: 3706, errorstring:Syntax error: expected something between the 'SELECT' keyword and the 'ROW' keyword.

0 replies
Failure to insert in table Topic by ranjan.kumar1 22 Aug 2011

I am trying to use JDBC connection to teradata from a map-reduce program (Hadoop). I am getting the following error stack trace.

11/08/22 10:57:33 INFO mapred.JobClient: Task Id : attempt_201107010928_0154_m_000001_2, Status : FAILED
at com.teradata.jdbc.jdbc_3.ifjdbc_4.LocalStatementParameters.buildBatchStatement(
at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalPreparedStatement.executeBatch(

1 reply, 10 years ago
How to convert coordinates between different "GeospatIal reference system" ? Topic by pasaron 28 Mar 2011 geospatial, reference system

I´m developing a GIS for a company and the coordinates are in UTM ED50(old standard in Europe) and and I need to turn to those used in Google maps ....... (WGS-84)

I've tried using the function:
ST_Transform (SRS_to.srtext, SRS_from.srtext)

SRS_to.srtext = WGS-84
SRS_from.srtext =UTM coordinates

but can not get the right result.....

Is it possible?

1 reply, 10 years ago
XML Services - publish_lob_ref - SQL query string input limitation Topic by jcmerceronhome 30 Sep 2010


we try to use PUBLISH_LOB_REF Stored procedure with XML Services to publish a document with a SQL Query. But we have to face of the limitation of the SQL query string input (varchar 20000).
our SQL query is about 60000 char.

how can we bypass that limitation ?
any help please?


1 reply, 10 years ago
SP_REGISTER_SCHEMA Topic by hvganipineni 09 Nov 2010 xml teradata


We are trying to do the stream shredding of an xml document, and we are stuck at using the procedure SP_REGISTER_SCHEMA, I have tried different ways of using this procedure based on the earlier experience I had with other procedures. But I am not able to get this procedure function properly. Could someone give us an example as to how to use this procedure?

1 reply, 10 years ago
Adding UDF_ReplaceStr to more than 4 columns of an existing query throws error SELECT Failed. 3577: Topic by Moorlan 27 Jul 2011

I am trying to add a UDF (UDF_ReplaceStr) existing query that has been working for some time. As long as I am adding it to four or less of the columns it is OK but it throws the error "SELECT Failed. 3577: Row size or Sort Key size overflow." when adding it to the fifth.

Can anyone shed light on why?

2 replies, 10 years ago