Setting Up to Run the Examples - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Native Object Store Getting Started Guide

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zws1595641486108.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1214
lifecycle
previous
Product Category
Software
Teradata Vantage

Setting Up a Test User and Privileges

As an administrative user, set up a test user and grant the necessary privileges to the user to run the following examples.

CREATE USER nos_usr FROM dbc AS PERMANENT=30e8 PASSWORD=nos;

GRANT CREATE TABLE on nos_usr to nos_usr;
GRANT EXECUTE FUNCTION on TD_SYSFNLIB.READ_NOS to nos_usr;
GRANT CREATE AUTHORIZATION on nos_usr to nos_usr;
GRANT CREATE DATASET SCHEMA ON SYSUDTLIB TO nos_usr;
GRANT CREATE FUNCTION ON nos_usr to nos_usr;

See Setting Up a Test User and Setting Access Privileges.

Setting Up an Authorization Object and a Function Mapping

  1. Log on as a user with the required privileges. For example log in as the user just created, nos_usr.
  2. Create an authorization object with the credentials to external object store:
    CREATE AUTHORIZATION DefAuth
    AS DEFINER TRUSTED
    USER ''
    PASSWORD '';
    To access the Teradata-supplied public buckets, enclose an empty string in single straight quotes for USER and PASSWORD.
  3. Create a function mapping:
    CREATE FUNCTION MAPPING READ_NOS_FM
    FOR READ_NOS EXTERNAL SECURITY DEFINER TRUSTED DefAuth
    USING
    BUFFERSIZE,
    SAMPLE_PERC,
    ROWFORMAT,
    RETURNTYPE,
    HEADER,
    MANIFEST,
    LOCATION,
    STOREDAS,
    FULLSCAN,
    ANY IN TABLE;

For more details, see Controlling Foreign Table Access with an AUTHORIZATION Object and Controlling READ_NOS and WRITE_NOS Access with a Function Mapping.