Usage Notes - 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ā„¢

To gain access to the data that the control copy of the table function stores in the control scratchpad, use this function when a call to FNC_GetPhase returns a value other than TBL_PRE_INIT for the processing phase.

Subsequent changes to the control scratchpad are considered local and are retained in the scratchpad for the next iterations of the local table function copy.

Use the control scratchpad to keep track of what a table function is supposed to be doing and what it has left to do.

Do not store pointers in the scratchpad that reference other structures in the scratchpad, because the returned address of the scratchpad is not the same for subsequent invocations of the table function. Instead, use relative addressing, such as offsets from the current address of the scratchpad.

This function can only be called from within a table function.

Calling this function is valid only when the table function calls FNC_GetPhase and gets the following return values:
  • TBL_MODE_CONST for the mode
  • a value other than TBL_PRE_INIT for the processing phase