C Constant/Variable Mode Table Function | UFC Code Examples | Teradata Vantage - C Constant/Variable Mode Table Function - 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
Language
English (United States)
Last Update
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 function that supports both TBL_MODE_CONST and the TBL_MODE_VARY modes. The TBL_MODE_CONST is very simple in that any one AMP will extract the data out of the text string that is passed in.

This example extracts some data out of a 'raw' text field to generate a bunch of rows. The raw data is in this format:

store_number,entries:entry[;...]
entry
customer_ID,item_ID
store_number
Number that identifies the store that sold the items to the customers.
entries
Number of items sold.
customer_ID
Customer identifier.
item_ID
Item identifier.