C Table Operator | UFC Code Examples | Teradata Vantage - C Table Operator - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢

This example shows the C code for a table operator.

The required inputs for this aggregation operator are:
  • The input table (or table expression) specified in the FROM clause of the SELECT statement. For this example, we will use the following table and input:
    CREATE TABLE tab1 (A INTEGER,
                       B INTEGER,
                       C INTEGER,
                       D INTEGER);
    
    INSERT INTO tab1(1,2,3,4);
    INSERT INTO tab1(2,3,4,5);
  • Each aggregate is a Custom clause, such as SUM_AGG(c1, c2) and AVG_AGG(c3).