16.20 - Usage Notes - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

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.