Hash Related Functions | SQLAlchemy | teradataml - Hash Related Functions - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Supported functions

S/N Function Name Description Comment
1 HASHAMP Finds the primary AMP corresponding to the hash bucket number specified in the expression and returns the AMP ID.

If no hash bucket number is specified, HASHAMP returns one less than the maximum number of AMPs in the system.

  • Only expression, i.e., column can be passed to this function.
  • MAP and COLOCATE USING clauses of the functions are not supported.
2 HASHBAKAMP Finds the fallback AMP corresponding to the hash bucket number specified in the expression and returns the AMP ID.

If no hash bucket is specified, HASHBAKAMP returns one less than the maximum number of fallback AMPs in the system.

  • Only expression, i.e., column can be passed to this function.
  • MAP and COLOCATE USING clauses of the functions are not supported.
3 HASHBUCKET Returns the hash bucket number that corresponds to a specified row hash value.

If no row hash value is specified, HASHBUCKET returns the highest hash bucket number.

 
4 HASHROW Returns the hexadecimal row hash value for an expression or sequence of expressions.

If no expression is specified, HASHROW returns the maximum hash code value.

User can execute this either by passing expression or without any expression.