MurmurHash Example 2: 64-Bit Value (Specified) - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.00
1.0
Published
May 2019
Language
English (United States)
Last Update
2019-11-22
dita:mapPath
blj1506016597986.ditamap
dita:ditavalPath
blj1506016597986.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

This example shows how specifying HashBit('64') affects the hash values. As in the 32-bit value example, when the temperature value in the input table is an integer, the hash values are the same for INTEGER and VARCHAR, but different for REAL. When the temperature value in the input table is real, the hash values are the same for REAL and VARCHAR, but different for INTEGER.

Input

SQL Call

SELECT * FROM MurmurHash (
  ON murmurhash_input
  USING
  InputColumns ('[2:7]')
  HashBit (64) 
  Accumulate ('id')
) AS dt ORDER BY 1;

Output

id period_timestamp_murmurhash period_text_murmurhash period_date_murmurhash temp_f_real_murmurhash temp_f_integer_murmurhash temp_f_text_murmurhash
1 2081499398607021206 1892844779878238375 -3374208292985920001 1293995461165576289 6315281623848420264 1293995461165576289
2 515846716270079702 -7113059074592314425 7968959960480043948 -3815305352492785825 2118418006307321788 -3815305352492785825
3 -1513387057007090709 5003897662396662390 1794743325310104289 1044130231958811690 2118418006307321788 2118418006307321788
4 5181116076770007143 -3056768082299206123 6786124399480028630 1386486412937455134 7355370209912386178 1386486412937455134
5 7275307893407845346 2474048315384364200 1414589266172155885 8029796110320680006 -5952800379241158136 -5952800379241158136