I/O in UDFs | SQL External Routine Programming | Teradata Vantage - I/O - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™

The following rules apply to I/O.

IF the UDF … THEN the function …
runs in nonprotected execution mode cannot do any I/O, including standard I/O and network I/O.
specifies the EXTERNAL SECURITY clause in the CREATE FUNCTION or REPLACE FUNCTION statement can do I/O or otherwise interface with the operating system such that the operating system retains resources such as file handles or object handles.

The function executes as a separate process under the authorization of a specific native operating system user established by a CREATE AUTHORIZATION or REPLACE AUTHORIZATION statement.

The function must release opened resources (close handles) before it completes. Table functions must release opened resources before completing the end phase. All other types of functions must release opened resources before each instance of the function terminates.

runs in protected execution mode can do I/O or otherwise interface with the operating system such that the operating system retains resources such as file handles or object handles.

The function executes as a separate process under the authorization of the 'tdatuser' operating system user.

The function must release opened resources (close handles) before it completes. Table functions must release opened resources before completing the end phase. All other types of functions must release opened resources before each instance of the function terminates.

For more information on protected execution mode, see Protected Mode Function Execution for C/C++ UDFs.