17.10 - Usage Notes - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
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);