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

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)

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;