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

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.10
1.1
Published
October 2019
Language
English (United States)
Last Update
2019-12-31
dita:mapPath
ima1540829771750.ditamap
dita:ditavalPath
jsj1481748799576.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

This example shows how specifying HashBits('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
  TargetColumns('[2:7]')
  HashBits(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       2118418006307321788    1293995461165576289
  2          515846716270079702   -7113059074592314425    7968959960480043948   -3815305352492785825       2118418006307321788   -3815305352492785825
  3        -1513387057007090709    5003897662396662390    1794743325310104289    1044130231958811690       2118418006307321788    2118418006307321788
  4         5181116076770007143   -3056768082299206123    6786124399480028630    1386486412937455134       6315281623848420264    1386486412937455134
  5         7275307893407845346    2474048315384364200    1414589266172155885    8029796110320680006      -5952800379241158136   -5952800379241158136

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.