Teradata Vantage™ - SQL External Routine Programming describes how to program Teradata user-defined functions (UDFs), user-defined methods (UDMs), and external stored procedures, which are collectively called external routines.
Customers using Vantage delivered as-a-service cannot create their own C++ and Java UDFs, UDMs, UDTs, or External Stored Procedures.
Using SQL External Routine Programming
This document is primarily for application programmers and provides the following information:
- Describes how to create Teradata user-defined functions (UDFs), user-defined methods (UDMs), and external stored procedures, which are collectively called external routines
- How to use global and persistent (GLOP) data in the UDFs, UDMs, and external stored procedures that you create
- How to run R scripts to analyze data stored in Analytics Database
- How to write R table operators
Why Would I Use this Content?
Use this content if you want to do the following:
- Create UDFs or external stored procedures in C, C++, or Java
- Create UDMs in C or C++
- Create C or C++ UDFs, UDMs, and external stored procedures that use GLOP data
- Install R components and packages
- Run R scripts or create R table operators
How Do I Use this Content?
Depending on the function, external stored procedure, method, or table operator you want to create, go to the relevant section.
How Do I Get Started?
To create C, C++, or Java external routines:
- Go to the relevant section which describes how to create the UDF, external stored procedure, or UDM using the programming language of your choice. For example, C/C++ User-Defined Functions.
- Review the system requirements, configuration settings, and other administrative tasks that you may have to perform. See Administration.
- Review how C and Java data types map to SQL data types for use as parameters and return types in your external routine. See SQL Data Type Mapping.
- Review the C library functions and Java application classes you can use when developing your external routine. See C Library Functions or Java Application Classes.
- See the code examples, such as UDF Code Examples.
To run R scripts or create R table operators:
- Install the necessary R components and packages. See Installation of R Components and Packages.
- If you want to run R scripts, you can use the SCRIPT table operator. For details about SCRIPT, see the "Table Operators" section in Teradata Vantage™ - SQL Operators and User-Defined Functions, B035-1210.
- If you want to run R scripts using the ExecR system table operator, or write R table operators that can be executed by ExecR, see R Table Operators.
References to Other Relevant Content
Use Teradata Vantage™ - SQL External Routine Programming in conjunction with the other volumes of the SQL document set, in particular the following documents:
- Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144
- Teradata Vantage™ - Database Administration, B035-1093
- Teradata Vantage™ - SQL Data Manipulation Language, B035-1146
- Teradata Vantage™ - Data Types and Literals, B035-1143
R resources:
- R and Python Support in Teradata Vantage
- See the SCRIPT table operator in Teradata Vantage™ - SQL Operators and User-Defined Functions, B035-1210