Function Mapping for READ_NOS | CREATE FUNCTION MAPPING | Teradata Vantage - 17.10 - Example: Function Mapping for READ_NOS - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)
This statement creates the function mapping NOS_Reader for the READ_NOS table operator using the authorization MyObjAuth.
To create a function mapping for READ_NOS, you must have the EXECUTE FUNCTION privilege on READ_NOS.
For information about the READ_NOS table operator, see Teradata Vantage™ - SQL Data Manipulation Language, B035-1146.

Create an authorization object called MyObjAuth:

CREATE AUTHORIZATION MyObjAuth
 AS DEFINER TRUSTED
     USER 'YOUR-ACCESS-KEY-ID'
     PASSWORD 'YOUR-SECRET-ACCESS-KEY';

Create the function mapping for READ_NOS:

CREATE FUNCTION MAPPING NOS_Reader
FOR READ_NOS
EXTERNAL SECURITY DEFINER TRUSTED MyObjAuth
USING
LOCATION,
BUFFERSIZE,
RETURNTYPE,
SAMPLE_PERC,
STOREDAS,
FULLSCAN,
MANIFEST,
ROWFORMAT,
HEADER,
ANY IN TABLE;