return f"rtrim(hash_sha256(TransUnicodeToUTF8(TRANSLATE({arg} using latin_to_unicode WITH ERROR))))")
This line assumes that all characters can be converted into Latin - which is then converted to Unicode and UTF8. When a non latin character is presented Teradata throws the error. One solution is to have the user provide an option to DVT --beyond-latin or -byl which would indicate that table columns are Unicode and/or some table columns have characters beyond the latin character set. In that situation, the backend can generate the following SQL for Teradata
If a Teradata column contains a string which has Unicode Characters beyond the Latin character set, DVT fails with the following error:
If the row with the offending character is excluded from the validation, the validation succeeds.
The problem is with this line
This line assumes that all characters can be converted into Latin - which is then converted to Unicode and UTF8. When a non latin character is presented Teradata throws the error. One solution is to have the user provide an option to DVT
--beyond-latin
or-byl
which would indicate that table columns are Unicode and/or some table columns have characters beyond the latin character set. In that situation, the backend can generate the following SQL for TeradataIf we did the above when there are columns with latin encoding and latin character set, the validation will fail.
Sundar Mudupalli