Executing a Function Mapping - Teradata Database - Teradata Vantage NewSQL Engine

SQL Data Manipulation Language

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
fbo1512081269404.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantage™

In this scenario, the Attribution function mapping is on the local Teradata system in SYSLIB and in the database alias_db.

In the statement below, because user u1 does not specify a database, the system checks for the Attribution function mapping object in database u1. If the Attribution object is not on u1, the system checks SYSLIB. Because the Attribution is on the local system, the system invokes local implementation of Attribution.

SELECT * from Attribution ( 
   ON appl_view_db.input_table PARTITION BY 1
   ON appl_view_db.model1_table as model1 DIMENSION
   USING
      TimestampColumn('tscol')
      EventColumn('eventcol')
      WindowSize('rows:10')
) as dt;

Then, user u1 specifies another database.

DATABASE alias_db;

Then, user u1 can invoke the function mapping Attribution on the remote system with either of the following statements.

SELECT * FROM Attribution ( 
   ON appl_view_db.input_table PARTITION BY 1
   ON appl_view_db.model1_table AS model1 DIMENSION
   USING
      TimestampColumn('tscol')
      EventColumn('eventcol')
      WindowSize('rows:10')
) AS dt;
SELECT * FROM alias_db.Attribution ( 
   ON appl_view_db.input_table PARTITION BY 1
   ON appl_view_db.model1_table AS model1 DIMENSION
   USING
      TimestampColumn('tscol')
      EventColumn('eventcol')
      WindowSize('rows:10')
) AS dt;