Handling of Non-Deterministic Elements - Teradata Unity

Teradata® Unity™ User Guide

Product
Teradata Unity
Release Number
16.20
Published
May 2019
Language
English (United States)
Last Update
2019-05-23
dita:mapPath
dzf1517499323110.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2520
lifecycle
previous
Product Category
Analytical Ecosystem
Teradata Database allows Unity to override certain non-deterministic functions, such as current time and random. The following table shows which SQL functions are automatically rewritten if used in a SQL request performs a write.
SQL Function Replacement
RANDOM If Change Data Multicast (CDM) is disabled, active sequencer replaces this function with a single randomly generated value. A single write request involving multiple rows results in the same random number. If CDM is enabled, Unity will not replace the RANDOM clause. The write requests are replicated using CDM.
CURRENT_DATE Active sequencer generates a date to replace this function.
CURRENT_TIME Active sequencer generates a time to replace this function.
CURRENT_TIMESTAMP Active sequencer generates a timestamp to replace this function.
DATE Active sequencer generates a date to replace this function.
SESSION Not supported.
TIME Active sequencer generates a time to replace this function.
HASHAMP Not supported.
HASHBAKAMP Not supported.
HASHROW Not supported.
HASHBUCKET Not supported.
ROW NUMBER If CDM is disabled, not supported. If CDM is enabled, write replicated using CDM.
Sample Clause If CDM is disabled, not supported. If CDM is enabled, write requests using SAMPLE clause are supported and replicated using CDM.
INSERT into table with identity column If CDM is disabled, not supported. If CDM is enabled, write replicated using CDM.
Non-deterministic User-Defined Function If CDM is disabled, write replicated using SQL Multicast. If CDM is enabled, write replicated using CDM.
Stored procedure call If CDM is disabled, writes are replicated using SQL Multicast and traditional Unity SP limitations apply. If CDM is enabled, writes are replicated using the enhanced stored procedure feature and traditional limitations do not apply.
Updatable Cursors If CDM is disabled, write replication is not supported. If CDM is enabled, writes are replicated using CDM.

Unity must be part of the secure database cluster to verify override. The secure database cluster includes Unity and all Teradata systems that it manages. Systems in the secure database cluster are identified via shared proxy certificates that must exist on all database nodes as well as on all Unity server nodes.

For more information on Teradata Proxy certificates, see the Teradata® Database Security Administration guide.

The recovery log stores raw SQL statements run after non-deterministic elements are replaced. Only one SQL statement is recorded regardless of the number of rows affected, unless CDM is used. If CDM is used the change data is stored in the recovery log.