15.11 - Row Hash Validation Example - Teradata Ecosystem Manager

Teradata Ecosystem Manager User Guide

prodname
Teradata Ecosystem Manager
vrm_release
15.11
created_date
May 2016
category
User Guide
featnum
B035-3201-056K

You can enter a custom validation up to 500 characters. You can specify the aggregate function, such as AVG, MIN, MAX, and COUNT.

For example, for a table with the following definition:

CREATE SET TABLE SampleDC
     		(
      EcosystemId VARCHAR(20) CHARACTER SET UNICODE NOT CASESPECIFIC NOT NULL,
      EcosystemName VARCHAR(30) CHARACTER SET UNICODE NOT CASESPECIFIC,
      DefaultTDPID VARCHAR(72) CHARACTER SET UNICODE NOT CASESPECIFIC,
      CreatedTS TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(6),
      ModifiedTS TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP(6),
      TMSMUserId VARCHAR(64) CHARACTER SET UNICODE NOT CASESPECIFIC)
UNIQUE PRIMARY INDEX UPI ( EcosystemId 
);

Then you can enter a customized row hash validation expression for the most reliable checksum of the table contents:

SELECT (SUM(CAST(HASHBUCKET(HASHROW(EcosystemID, Ecosystemname, DefaultTPDID, CreatedTS,ModifiedTS,TMSMUserId)) AS
DECIMAL(38,0))) MOD 111111111111111) as checksum FROM SampleDC;

For this example, hashing is presumed the same on all Teradata systems involved in the table validation.