Running a Function Mapping - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

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;