Executing a Function Mapping - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

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
2024-10-04
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantageā„¢

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

In the following statement, 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;