17.10 - getNodeIds() - 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)

Returns an array of node information, where each array element is the unique number of a node.

The number of elements in the array can be determined by NodeInfo.getNumAMPs().

The array elements map one-to-one with the array elements from NodeInfo.getAMPIds(). For example, the second array element from NodeInfo.getNodeIds() is the node number for the AMP in the second array element from NodeInfo.getAMPIds().

Node numbers occur in ascending order and each node number is repeated for the total number of AMPs on that particular node.

In the event of a node failure, a HSN (hot standby node) takes over the online AMP vprocs from the failed node. In this case, getNodeIds() returns the node ID of the HSN instead of the failed node. Therefore, you may get results that are not in the order expected with regards to the node ID.