C/C++ User-Defined Functions | SQL External Routine Programming | Vantage - C/C++ User-Defined Functions - Teradata Vantage - Analytics Database

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2026-03-06
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
Teradata Vantageā„¢

Teradata provides built-in functions that address the needs of typical users. In those cases when standard functions are inadequate, Teradata allows you to define user-defined functions (UDFs) that extend the capability of normal SQL within the database.

UDFs are database objects that you build or acquire. For example, you can install UDF objects or packages from third party vendors without providing the source code. A UDF is similar to standard SQL functions such as SQRT, ABS, or TRIM and is invoked in the same manner.

You can write UDFs in C or C++ and compile UDFs into shared objects. You can use compiled UDFs in SQL statements to enforce business rules or help transform data.

UDFs run in parallel within the database. However, the developer of the function can direct which AMPs (virtualized parallel processors) participate. UDFs run under the control of the AMP and can be efficient doing row-by-row complex analyses. UDFs are scalable and inherit the natural parallelism in Teradata.

You can use UDFs for external I/O, data conversion, encapsulating complex business calculations, complex statistical calculations using the aggregate function class, and a wide range of other uses.

Additional details are available at https://www.teradata.com.