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

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

Return Value

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.