FNC_TblFirstParticipant Function | C Library Functions | Teradata Vantage - FNC_TblFirstParticipant - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Provides a way to implement a table function that only needs one copy to participate and does not care which AMP the copy runs on.

IF the copy of the table function … THEN FNC_TblFirstParticipant returns …
is the first copy to call FNC_TblFirstParticipant 1.

This copy of the function will participate in the current transaction and request.

is not the first copy to call FNC_TblFirstParticipant 0.
calls FNC_TblFirstParticipant in the wrong mode or phase -1.

Use this library function when the return value of FNC_GetPhase is TBL_MODE_CONST, indicating that the SELECT statement invoked the table function with constant expression input arguments. For example:

SELECT *
FROM TABLE (table_function_1('STRING_CONSTANT'))
AS table_1;