Usage Notes - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

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);