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™
Take the following steps to configure copies of a table function to run on specific AMPs only:
  1. Call FNC_TblGetNodeData to get the list of all node numbers and AMP vproc numbers.
  2. Determine which AMP vprocs will run copies of the table function.

    For example, if only one AMP vproc is supposed to participate per node, the logic can simply pick the first AMP vproc on each node in the list, because the information is returned in ascending order.

  3. Call FNC_AMPInfo to get the local node and AMP vproc number.

    For table functions:

    IF the local node and AMP vproc number … THEN …
    were selected to run a copy of the table function participate in table function processing.
    were not selected to run a copy of the table function call FNC_TblOptOut.

    For table operators, include an if statement to determine whether the local node and AMP were selected. If they were selected, the control flow goes through the processing of the operator. Otherwise, processing is skipped.

This function can only be called from within a table function or a table operator. Calling this function from a scalar function, aggregate function, UDM, or external stored procedure results in an exception on the transaction.