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

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™
This statement creates the function mapping NOS_Reader for the READ_NOS table operator using the authorization InvAuth_S3 and specifying a location on Amazon S3.
To create a function mapping for READ_NOS or WRITE_NOS, you must have the EXECUTE FUNCTION privilege on READ_NOS.
For information about the READ_NOS and WRITE_NOS table operators, see Teradata Vantage™ - SQL Data Manipulation Language, B035-1146.

Create an authorization object called InvAuth_S3:

CREATE AUTHORIZATION InvAuth_S3
 AS INVOKER 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 INVOKER TRUSTED InvAuth_S3 USING
LOCATION('/S3/td-usgs.s3.amazonaws.com/td-usgs/JSONDATA/');