2

As part of a project I need to retrieve personal user information from a Teradata table. To preserve user privacy we need to have access only on the sha256 hash of the values.

Would it be possible in Teradata to hash the value directly in the query?

I tried:

SELECT sha256(login_email) as sha_login_email
FROM tablex;

but the function sha256(binary) doesn't work with Strings.

I get an error: The string contains an untranslatable character. whichever string is processed by the query.

malavock
  • 341
  • 1
  • 5
  • 21
  • 1
    Are you using a UDF? – Andrew May 19 '21 at 16:10
  • 1
    There is no built-in SHA256. What is the function signature (argument types / return type)? You can query DBC.FunctionsV for this info. You can also use HELP or SHOW but if the function is overloaded you either have to supply literal arguments or use the SPECIFIC FUNCTION name so the database can select the matching implementation. – Fred May 19 '21 at 16:47
  • We need to hash some values, Teradata's HASHROW() function (with 4.9 B) doesn't provide enough possibilities, and I'm looking for other Teradata hashing functions. – Andrew Koper Oct 28 '21 at 20:06

0 Answers0