16.20 - Usage Notes - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

Keys are indexed in the order that they appear in the query, starting at 0. In the following query, SUM_AGG would have index 0 and AVG_AGG would have index 1.

SELECT *
FROM udaggregation (
         on (select * from tab1)
         using SUM_AGG('A', 'B')
               AVG_AGG('C')
) as D;

Before calling FNC_TblOpGetCustomKeyInfoAt, you must allocate memory for the out_info data structure:

out_info = FNC_malloc(sizeof(Key_info_t))

You must release the data structure when it is no longer needed:

FNC_free(out_info);